In actions for the recovery of wages for labor performed, where the amount of the demand, exclusive of interest, does not exceed three hundred dollars ($300), the court shall add, as part of the cost, in any judgment recovered by the plaintiff or cross-complainant, an attorney’s fee not exceeding 20 percent of the amount recovered.