I'm not sure if the entire gun can be made out of plastic without making the gun near useless or explode in your hands as you shoot it.
Usually these 'homemade' guns buy a lot of professionally made gun parts such as the rifle barrel and just make their own lower receiver, which isn't exposed to the explosive high pressure part of a gun.