A new in-depth analysis of the nation's public schools, state-by-state, finds New Jersey schools ranked third overall.  

NJ school earned high marks in a recent survey. (Creatas, ThinkStock)

WalletHub.com measured the quality of education in all 50 states plus the District of Columbia, and New Jersey was in the top three, ranked third only after Colorado and Massachusetts.

"New Jersey is doing pretty much everything well," WalletHub Spokeswoman Jill Gonzalez said.

She said they analyzed 13 different metrics, ranging from student/teacher ratios to standardized test scores as well as dropout rates and overall safety of a school environment within a state. New Jersey did well, basically on all accounts.

That includes the second-lowest dropout rate. Also, the state is fourth-best in math and reading, according to WalletHub. Gonzalez says when it comes to the teacher-to-student ratio, New Jersey is, "actually the fifth best. There is about 12 students for every one teacher. We found that teachers can give more attention to each student, those test scores really show it."

School safety also ranks very high in New Jersey, according to the survey. WalletHub studied the percentage of public school students in grades nine through 12 who reported either being threatened or injured on school property last year. Only about 6 percent in New Jersey made such reports, which places New Jersey in the top 15 states in this category, according to the survey.

Gonzalez said when it comes to bullying incidents, they looked at two types: bullying incidents on school property and cyber-bullying, which of course, has been growing rapidly, although not as much in New Jersey as other states.

"In New Jersey that is not the case. They are managing to keep that number below 15%  of the student body," she said.

It seems the only area in which the state ranked lower was in SAT scores. The Garden State ranked "average" in this area, according to the survey.

"When we looked at the average SAT score we did so on a per section basis," Gonzalez said. "In New Jersey, that is about 508 per section. Of course, the best score is 800. The best average that we saw was in North Dakota, Illinois, Iowa...just around that 600 range. New Jersey ranks 30th there. Not the best, but not at all the worst, either."

The number-one-rated schools were in Massachusetts. The worst-rated were in Alaska, which had some of the highest school dropout rates in the country.