The WD-40 has one major problem with guns, when use internal on revolver or automatics it eventually will dry up leaving a shellac like film something like the brown gum sometimes seen in vlave covers of engines. This is why any lock smith will tell you never to use the stuff in locks.
I picked up a hell of a deal one time on a S&W CS-45 automatic because the owner had used WD-40 and the gun become almost unusable and even the slide was hard to work. I brought the gun home and used diesel fuel and then disk brake cleaner to get the gun clean. I kept it awhile and then tripled my money about 3 or 4 months later.
For use inside of revolvers that you do not want to take apart all that often I recommend a good synthetic oil of some type. I used Mobil 1 5W-20 oil for years on my guns and then in recent years Mobil 1 in spray can and Mobil 1 synthetic bearing grease for the rails on my auto loading guns.