What size/shape window for a WiFi board inside a metal box?
Since the window would actually be a near-field coupled antenna element, it would need to be sized to be resonant.  The approximate size would be one half wavelength in the long direction, and less than 1/4 wavelength in the short direction, with the orientation being the same as the PCB trace antenna.  The size error, as well as other factors like the size of the box and coupling distance from the PCB trace, would determine the radiation pattern and the VSWR.  The quality of the cutting of the slot can also affect it (jagged is bad, smooth is good).

An alternative would be to not have a window at all, and place an antenna inside the box at some distance from the box metal surface, and connect it through an SMA connector to the outside, and use another antenna there.  Near field coupling inside would pass most of the power through, depending on how the box size behaves as a resonant cavity.