The key problem regarding gun cleaning is that WD-40 is a penetrating oil. It can penetrate into cartridges and inactivate the propellant powder and/or primer.
I learned this the hard way while a university student. The press of studies kept me away from the range for a couple of months. When break arrived and I went to the range, With the very first round, I had a squib load with commercial ammunition. I sent the remaining ammo to the factory for examination. They determined that the culprit was the WD-40 that I had used to clean the revolver..
So… don't use WD-40 for gun cleaning.
Use a proper CLP cleaner.