Sunny California has a dark cloud looming over its public school system.

According to a new WalletHub study, the state ranks 28 for public school systems, placing it on the lower half of the list. While California doesn't have the worst public schools in the nation, it does have a high spending rate for weak public school systems.

Source: WalletHub

California has the highest pupil-teacher ratio in the country, meaning class sizes are much too big per teacher.

California public schools also struggle to get students to score well on reading comprehension tests. The state ranks 47, in the bottom five, for reading test scores.

However, California scored in the top 10 for having low bullying incidence rates as well as a low percentage of threatened and injured high school students.

Massachusetts has the best public school system in the U.S. and Louisiana has the worst, according to the study.

Researchers ranked states according to factors such as high school graduation rates for low-income students, dropout rates, median SAT and ACT scores, pupil-teacher ratio, number of violent or bullying incidents, youth incarceration rates and number of students with access to illegal drugs.