On my HTC One, Wifi works perfect when i'm near the box, but even i take some distance, the wifi signal show it's good, 2 or 1 bar, but the speed is very very slow. It wasen't like this when i had the phone.
I try all, update the firmware, try different rom, stock and custom, full wipe of the internal storage,...
And so, i try with 2 different other phones, at the same distance of my box. The 2 other phones (Galaxy S4 et a Wiko Darside) keep a correct wifi speed.
On the other hand, in 3G any problem, normal speed.