(a) The election of any person declared elected to any office of a city or town may be contested by any person who was at the time of the election a qualified elector of such city or town for any of the following causes:
(1) Misconduct, fraud, or corruption on the part of any election official, any marker, the municipal governing body, or any other person;
(2) The person whose election to office is contested was not eligible thereto at the time of such election;
(3) Illegal votes;
(4) The rejection of legal votes; or
(5) Offers to bribe, bribery, intimidation, or other misconduct calculated to prevent a fair, free, and full exercise of the elective franchise.
(b) Any contest of such an election must be commenced within five days after the result of the election is declared. Such contest shall be instituted in the manner prescribed by Section 17-15-29 and, except as otherwise provided in this article, all proceedings relative to contests of elections to municipal offices shall be governed by the provisions of Articles 2 and 3, Chapter 15, Title 17 of this Code, insofar as they are applicable.