Rising fourth-quarter earnings failed to stem a slump in full-year profits for J&J Snack Foods as the US company battled soaring commodity costs.