(a) On any nonconforming structure or portion of a structure containing a nonconforming use, work may be done in any period of 12 consecutive months on ordinary repairs, or on repair or replacement of non-bearing walls, fixtures, wiring, or plumbing, to an extent not exceeding ten percent of the current replacement cost of the nonconforming portion of the structure, as the case may be, provided that the cubic content existing when it became nonconforming shall not be increased. (b) If a nonconforming structure or portion of a structure containing a nonconforming use becomes physically unsafe or unlawful due to lack of repairs and maintenance, and is declared by any duly authorized official to be unlawful by reason of physical condition, it shall not thereafter be restored, repaired, or rebuilt except in conformity with the regulations of the district in which it is located.