Shelly Relay Research question

The Shelly relays from what I have been researching are OUTSTANDING. I have not bought any yet, but had been using Yolink products - yes I want to get away from anything relying upon a hub that has to be cloud based and may do so eventually, but I have an inexpensive service ($9.99/Mo) where I can connect any Yolink sensors that I want - to the service to call me on the phone (and if I don’t reply - to cal the police) - which I may be using for a home alarm (also very good for leaks, etc.) Long story short -

For those items that do not need such service, such as certain light switches, etc. - I wanted to go with Zigbee relays - but my question is if the relay itself directly connects with WiFi - how is that handled when the relay would be in a metal wall switch box (older home, none are plastic)? Wouldn’t that hamper the WiFi connection from the router to the relay inside that box - so in that case it would be better to change the box to a plastic one, or - ?