vents and windows closed
This is something that should be aircraft specific. Consider a C152 with vents up high. Closing them only makes sure that you are going to breathe what's already in the cabin. In the case of an electrical fire it will be smoke which will then start to build up in the cabin. Why not open the vents and windows/ doors to get air flow through the cabin? Fire needs oxygen yes but it will surely get sufficient oxygen from the air flow through the cowl? I thought the point of turning ventilation off was to prevent smoke being recirculated to other parts of the aircraft cabin? This doesn't really apply to light aircraft. Hot or mixer air vents would be worth closing.
Would anybody consider turning the avionics switch off first to see if the smoke started to clear? Might be worth considering if you have electric flaps/ gear or what not and you do it as soon as you first smell or see any sign of smoke.