Either plastic or fiberglass boxes will do the job, or each one is totally code compliant. Some electricians prefer fiberglass ones because they’re tougher, but others prefer the plastic ones because they’re cheaper. No matter what style you opt for , pick box sizes that have a volume of at least 20 cu. in. Dimmer switches and other smart devices are widespread these days and take up more room in the box than the simple devices of the past. Plus, bigger boxes just make wiring easier, particularly if they’re crammed full of wires and connectors. Boxes destined for exterior walls and ceilings must be outfitted with a vapor barrier seal.