In all violations involving any ordinance of the city wherein it is provided that a civil penalty may be assessed, the city shall have the further power to assess in each case, in addition to any civil fine, the sum of $5 as costs in the proceedings.