I dont think it is worse than most of the wallwart PS modules.
The sonoff module (see attached) does not seem to have either common mode chokes.
A bad example is still a bad example...
In any case, what is the right way to design a high frequency filter for a DC power supply ?
I have in particular concern about the values of the ferrite beads to use. Can you comment on that ? Thanks.
Ferrite beads are specified by impedance, which isn't very useful except at the radio frequencies where that spec is measured (usually 100MHz). Typically they are crummy inductors, around 0.2 to 4uH with maximum Q of maybe 5.
For a common mode choke (CMC), exactly what combination of choke and Y-caps is needed will vary, but the power supply probably has a Y-cap between primary and secondary, so that's a start.
Ideally, you'd isolate the noisy supply from the outside world, by shielding it in a can, and where the leads pass through the shield, chokes and caps are placed. The chokes are placed on the inside, so that whatever RF voltage the power supply is generating, is dropped across the chokes. The caps are connected to the wires at the shield, so that very little voltage is developed across them, due to the RF current in the chokes (which is Inoise = Vnoise / Zchoke).
Ideally, you'd also use individual chokes, one for each line (except ground, which can be connected directly to the shield), but you can make a practical exception where each pair of lines (mains H/N, output +/-) has a CMC. This assumes that the differential mode noise is well filtered, which is usually the case, thanks to much larger film caps between lines (X type), and between DC +/-. You should add such a cap after each CMC to reinforce this.
If you do use a shield proper, you don't need two CMCs -- they're in series after all, so what difference does it make? But if you don't, there may be unbalanced noise, due to the power supply's capacitance to its surroundings. For this reason, it will be better with two CMCs. Whether it's actually necessary, you'd need an emissions setup to measure. Better safe than sorry.
How much shield is needed? Suppose you start with the supply inside a metal box. Suppose you open a hole in one side of the box. How much does that hurt? Probably not much, as the shield still surrounds things, and the hole only acts as an aperture for very high frequencies that the supply doesn't generate anyway. An aperture has a low frequency cutoff behavior, so it's still letting some through -- simply put, the internal electric field is visible through the hole (and a little bit of magnetic field). Suppose you grow the hole so that now the shield is half missing. Now you have a clear dipole situation, i.e., the supply is exposed and any voltage differences can radiate like a dipole antenna. The connections also can't come out simply anywhere -- they still must be in the shield, so they can only come out through the remaining sides of the shield. If we continue to grow the hole so that the shield shrinks to a tiny point, the wires can only come out at that point -- they must all cluster together around a common point, where the filters are. The supply is completely exposed and can radiate whatever it does, but if you can't afford shielding to cover it, this is as good as you can get.
So the circuit and layout you are looking for, is to bring the AC mains and DC output wires together, as close as possible (dictated by clearance rules), "short" them together using capacitors (a capacitor is an RF short circuit), specifically Y1/Y2 type capacitors to the AC side, then a CMC or two, from the capacitors to the power supply. You will also use a X1/X2 film cap from line to line (where the Y caps are), and something between DC +/- (probably ceramic or electrolytic).
On the given module, you may have to lift the PSU, and add an interposer (carved from copper clad PCB stock, say) implementing this filter circuit. Or it may be possible to tack it on underneath the PSU, but if the base board fits in an enclosure, there won't be space for CMCs there.
The motivation for the layout is topological, so I've introduced this as a topological thought experiment (enclose the supply in a Farday cage; expand a hole in it until the shield is inverted).
Tim