(a) No person shall permit to remain on his or her property any building, wall or other structure which has been damaged by fire, decay or otherwise, or any excavation remaining unfilled or uncovered for a period of ninety days or longer, which building, wall, structure or excavation is so situated as to endanger the safety of the public.
(b) No person shall permit to exist any dangerous, unguarded excavation or machinery in any public place, or so situated, left or operated on private property as to attract the public.