Some years ago I noticed that when I accidentally kicked my crybaby wah-wah I heard a loud crackling sound. I discovered that this was caused by the battery rubbing against the pedal casing. Not all 9 volt batteries are well insulated. I make it a habit to always wrap the battery with electrical tape before using it.
Watch for loose battery contacts as well, you can tighten them with a pair of pliers. It's usually better to replace the nine-volt battery clip when it becomes old and loose or the wires become frayed. Another trick is to add a 30 uf capacitor across the battery clip. This will prevent dangerous voltage spikes and loud crackling sounds caused by an intermittent connection.