This is an archived article that was published on sltrib.com in 2016, and information in the article may be outdated. It is provided only for personal research purposes and may not be reprinted.

As a parent of teenagers, I know that the preteen years are an unruly mess of conflicting moods — which, I guess, means that the hodgepodge that is "Middle School: The Worst Years of My Life" is spot-on in its depiction of the tween experience.

In this loosey-goosey adaptation of the first of best-selling author James Patterson's YA book series (No. 8 goes on sale later this month), the action centers on Rafe Khatchadorian (Griffin Gluck), an art-loving kid who's had a rough year or two and is starting over at a new middle school. He finds out the principal, Mr. Dwight (played by comic Andy Daly), has a strict set of rules he enforces with an iron fist, as he obsesses over his school's scores in the upcoming standardized tests.

Rafe — egged on by his friend Leo (Thomas Barbusca) — launches a stealth campaign to prank Dwight and break each of his rules one at a time. At the same time, Rafe and his little sister, Georgia (Alexa Nisenson), must deal with Carl (Rob Riggle), the obnoxious boyfriend of their mom (Lauren Graham), an overworked caterer.

The script — credited to the writing team of Chris Bowman and Hubbel Palmer ("Masterminds") and Kara Holden — jumps from low comedy to heavy drama, sometimes rather abruptly. There also are moments of teen romance, a hint of magical realism and bits of animation based on Rafe's sketchbook characters. Director Steve Carr ("Paul Blart: Mall Cop") can't make the parts meld smoothly, but he has an ear for a good joke.

To that end, the movie assembles a funny adult cast — besides Riggle and Daly, there's Adam Pally as a good-hearted teacher, the comedian Retta as Dwight's bulldog vice principal, and Efren Ramirez ("Napoleon Dynamite") as the put-upon janitor — as well as an engaging set of kid actors who carry the movie over its rough spots. "Middle School: The Worst Years of My Life" isn't the worst, or the best, movie you're likely to see, but settles nicely in the middle.

Twitter: @moviecricket —

HHhj

'Middle School: The Worst Years of My Life'

A preteen's view of seventh-grade torments makes for a funny, if uneven, movie.

Where • Theaters everywhere.

When • Opens Friday, Oct. 7.

Rating • PG for rude humor throughout, language and thematic elements.

Running time • 92 minutes.