Reviewer’s Rating: ★★

“Here Comes the Boom,” with Kevin James as a tubby high school science teacher who becomes a mixed martial-arts sensation, is every bit as ridiculous as it looks.

That’s not such a bad thing for the movie, whose makers embrace the fact that they’re essentially doing a live-action cartoon or a variation of that “Three Stooges” short where Curly becomes a boxing phenom whenever he hears “Pop Goes the Weasel.”

The premise here is barely less absurd than James conversing with animals in “Zookeeper,” yet he and director Frank Coraci, who also made that family comedy, assemble a likable gang of oddballs that make it kind of work. Everyone surrounding James’ Scott Voss is so disarmingly incredulous yet perversely enthusiastic about his MMA foray that they defuse the outrageousness of this guy getting into the cage against ferocious brutes and coming back out with his teeth and vital organs intact.

The real flaws in the comedy written by Allan Loeb and James are the stabs at genuine moments — the inspirational classroom hijinks, the simple-headed critiques of the shortcomings of public schools, the humdrum romance as James slowly wins the heart of Salma Hayek (yeah, like that’s going to happen).

Coraci lets all of that stuffing linger and wander too loosely. There are decent gags and laughs, but in between, it’s “here comes the boor” — James acting the buffoon to little effect for much of the movie.

At the outset, James’ Voss is a burned-out science educator who, so we’re told, was teacher of the year a decade earlier, though we never learn why he became a schoolroom slug. He’s inexplicably roused to action when the school principal (Greg Germann) announces huge cutbacks, including the music program run by nurturing teacher Marty Streb (Henry Winkler).

A decent college wrestler back in the day, Voss figures he can make some not-so-easy money as a punching bag in MMA fights, where even the losers can score good paydays. James buffed himself up a bit for the movie, so he looks more battle-ready than you’d expect. But when he starts winning some bouts and becoming a contender, the movie’s credibility skyrockets into “Rocky” territory and beyond.

James has pleasant chemistry with Hayek as the school nurse Voss perpetually hits on, but the wooing is mostly dull, and they never feel as though they could be a true beauty-and-the-beast couple the way James and Leah Remini did on “The King of Queens.”

Winkler’s enjoyably warm and fuzzy as the wimpy sidekick, while James’ sibling, “King of Queens” co-star Gary Valentine, and Melissa Peterman have funny moments as Voss’ brother and sister-in-law, forever sniping at each other while tending an indeterminately sized brood of kids.

As Voss’ trainer, former UFC champ Bas Rutten steals scene after scene with his lowbrow, bear-hugging charm, and singer Charice adds adorability as a bright and earnest student. Trying for authenticity in a terribly inauthentic story, the filmmakers bring in real martial-arts figures playing themselves, including ex-fighter Mark DellaGrotte and commentator Joe Rogan.

The actual fights are played seriously, save for a vomit gag that doesn’t provide the humor to justify its grossness. James goes into the cage and gets knocked around the way you figure he would, a real plausibility gap when he keeps walking away with little more than bumps and bruises after the vicious punches and kicks he absorbs.

Yeah, it’s just dopey comedy. We should accept it and move on. But then the filmmakers have to get in our face and make believe that Voss could actually have a shot against a real UFC contender (pro fighter Krzysztof Soszynski).

Is it any more ridiculous than the plot of “Rocky”? Well, yes, a lot. But no more ridiculous than “Rocky IV,” maybe.