The question of which gun cleaning solvent, protectant, and lubricant to use is one that comes rather often. This article addresses my thoughts and recommendations insofar as gun solvents/oils/protectants are concerned:
I’m a fan of Break Free CLP, and use it on all of my firearms. I’ve had no problem with rust, sticking parts, pitting, or other related issues. I’ve used it on a variety of firearms, including a Ruger 10/22, a Springfield XD, a Remington 11-87, an FN Pump Shotgun, a Remington 870, a Springfield 1911, etc. Out of all the combination solvent/lubricant/protectants I’ve tried, I’ve found BreakFree CLP to get my shotgun barrels clean after fewer passes with the bore snake or cleaning rod, even after firing hundreds of unplated lead shot shells.
When I bought my first shotgun (a Remington 870), the sales person threw in a can of Rem-Oil, which is Remington’s cleaning/lubricating product. It works fine, although I’ve found Break Free CLP to work a bit better. I still use Rem-Oil on the trigger group of my Remington 870, which is what Remington suggests. I sincerely doubt anything bad would happen if I were to use Break Free on the trigger group, but since I have the Rem-Oil I might as well use it.
Automotive Transmission Fluid
Transmission fluid is better than WD-40 (discussed below) but may not stand up well to the temperatures in some firearms parts, or to constant exposure to air. Transmission fluid is best used in your car’s transmission, rather than to lubricate your firearms. Also note that unlike Break Free CLP, transmission fluid does not have cleaning properties.
I would not suggest using WD-40 in place of a proper gun lubricant. WD-40 is designed to displace water, not to lubricate, which means it won’t offer the same type of protection that a proper gun lubricant would provide. WD-40 also leaves behind a residue as it dries, which can attract dirt. WD-40 also lacks the cleaning properties possessed by Break Free, Rem-Oil, and other products designed for use on firearms.