If a wall switch gets warm, crackles or smells like plastic, it may indicate a dangerous contact issue. The cause can be a loose terminal, overload, old mechanism or wrong wiring.
An electrician checks the switch terminals, wire ends, junction box, lighting load and breaker in the panel. A larger breaker should not be installed without checking the cable.
If the switch is hot, darkened, crackling or lights flicker, the circuit should be turned off and inspected. A new switch should be installed only after the heating cause is fixed.