Plastic electrical boxes have their pluses and minuses. Because they are plastic, there is no need to attach a ground wire to it. Since it is made of a non-conductive material, switches and outlets cannot short out if they touch the side of the box.
Plastic boxes usually come with tapped screw holes for easy attachment of switches and outlets. These boxes come in a single-gang, double-gang, and even multiple-gang configurations.
You can choose between plastic boxes with nail-on brackets, complete with nails, or a cut-in version that has tabs that spin out when tightened to hold the box securely to the wall.
The disadvantages of plastic boxes are their brittleness and wire support brackets. Let me explain. If you look at the box, you'll notice that the device screw holes are also plastic. If the screw is lined up when installing the device, you're fine. But get the screw cross-threaded and you have a problem. Suddenly the screw won't tighten down and the device is flopping in the wind. If the metal hole in a metal box strips out, you can just tap it out and it's as good as new. Not so easy with a plastic box.
The same holds true for the nail-on mounting brackets. If you hammer the nails carefully and don't accidentally hit the plastic bracket, you're fine. But the slightest miscue of the hammer head on the plastic bracket or body and the box is toast. Metal boxes can take a pounding and still function.
The plastic boxes sometimes have plastic push-in tabs to hold the nonmetallic sheathed (NM) wire. These tabs serve their purpose I suppose, but I'd much rather have a wire connector or a metal clamp with a screw that I can tighten the tension to hold the wires in place. In this case however, this box has knockouts to remove with no fastener for the wires.
One more thing I'll say about plastic boxes is that if you have a choice between a plastic or metal box, I would definitely choose the metal box every time. Yes, I suppose the plastic boxes are cheaper and easier to put up, but after years of experience, I'd still choose quality over price. My metal box will survive a fire, will your plastic box?