Is a longer Wi-Fi antenna better?
The typical stick-shaped rigid plastic-covered antennas on consumer Wi-Fi routers are typically half-wavelength dipoles (each element is a quarter wavelength for a total antenna that's a half-wavelength long).
They are not technically rubber duck antennas; rubber duck antennas are very flexible because they have a springy helical antenna covered in flexible rubber. A rubber duck antenna for CB frequencies (26-27MHz) happens to be similar in length to a half-wave dipole for Wi-Fi frequencies (2.4GHz), so laymen incorrectly assume based on external appearance that they're the same thing.
Well-designed half-wave dipoles max out at about 8dBi gain. However, you can stack them up to make a collinear dipole array, with each additional element adding a theoretical max of 3dBi gain. In practice, the marginal gain is probably more like 2dBi.
So:
8 dBi and 6 cm for the 1st dipole element + 2 dBi " " " " " 2nd " " + 2 dBi " " " " " 3rd " " + 2 dBi " " " " " 4th " " + 2 dBi " " " " " 5th " " + 2 dBi " " " " " 6th " " = 18 dBi and 36 cm for a 6-element collinear dipole array at 2.4GHz.
There's probably a little spacing between the elements, so it could be a little longer than that in reality.
So, it seems plausible that you could have something like a 6-element collinear dipole array omnidirectional antenna with 18dBi gain. Instead of a donut-shaped coverage pattern, it's got to be more pancake-shaped. :-)
But honestly, the cynic in me thinks it's much more plausible that you have something much less than an 18dBi omni antenna, but it's sold as 18dBi and they get away with it because no one in the wholesale/retail distribution chain has the equipment and expertise and time to properly measure it, so they just pass along the BS that the manufacturer told them.