(a) The governing body of every municipality shall have plenary power and authority by ordinance or a code of ordinances to:
(1) Regulate the erection, construction, repair or alteration of structures of every kind within the corporate limits of the municipality, prohibit, within specified territorial limits, the erection, construction, repair or alteration of structures of wood or other combustible material, and regulate excavations upon private property;