The one (and only, I’m afraid) good thing that can be said about Bad Teacher is that it has some wonderfully pungent lines. My hopes were certainly raised when Cameron Diaz’ character stormed into her fiancé’s house yelling “Get yourself hard, ‘cause I’m gonna suck your dick like I’m mad at it!” All right!

Unfortunately, the rest of the movie speed-races downhill. The usually appealing stars—Diaz, Jason Segel, Justin Timberlake, and the great Lucy Punch—are sadly miscast. And the ill-shaped script—by two writers whose only previous feature credit is the woeful Year One—constitutes an affront to the gods of plausibility.

Diaz plays Elizabeth Halsey, a hot-tramp teacher at an Illinois middle school. Elizabeth arrives in her classroom in tight red sheath dresses, stiletto heels, and impenetrable black shades to hide her hangover eyes. She keeps bottles of minibar liquor in a desk drawer and smokes pot in the parking lot outside. She’s hostile and insulting to her fellow teachers, and her classes consist of screening DVDs for her puzzled students of old movies related to the subject of education. (We see her starting off with Stand and Deliver.) Her only goal in life is to snag a rich man to support her; so when her wealthy fiancé understandably dumps her, she decides that her sole hope of corralling a well-heeled husband is to purchase “a new pair of tits.”

If it need be said, Cameron Diaz, with her big sweet smile and her effervescent light-comic touch, is the last actress you’d expect to be playing such a grotesque and unlikeable caricature. (Even in our current era of out-of-control teachers unions, a wanton tart like Elizabeth wouldn’t last a day in any conceivable school.) A sleazy sexpot is far beneath her talents, and in any case she lacks the overblown physical equipment to be convincing in the part. As if anyone could.

In an effort to raise the money for her desired breast-augmentation, Elizabeth starts hitting up parents for cash in exchange for individually mentoring their offspring. When this proves an insufficient plan, she takes over the school’s annual student car-wash fundraiser, with an eye toward embezzling the profits. In one of the movie’s many ridiculous sequences, we watch Elizabeth, in tiny cutoffs and belly-baring top, with spurting hose in hand, writhing lewdly atop wet, soapy automobiles. An urge to avert one’s eyes is difficult to resist.

Also beached in the moronic shallows of this story is Timberlake, playing a prissy new substitute teacher named Scott, upon whom Elizabeth instantly sets her sights once she learns he’s independently loaded. Scott—if you can believe, and you can’t—is “not ready” for sex yet, and the scene in which he and Elizabeth dry-hump on a bed all the way to ejaculation sets a new standard in off-putting idiocy. Justin Timberlake as a bow-tie-wearing milquetoast? What was director Jake Kasdan thinking? If anything.

Poor Lucy Punch is stranded in the role of…well, I’m afraid her character’s name is Amy Squirrel, in the witless manner in which others are called “Wally Snur” and “Garrett Tiara.” Amy is a lovably burbly fellow teacher who attempts to befriend Elizabeth, but of course is harshly rebuffed. When Scott selects Lucy as the object of his limp romantic affections, Elizabeth is infuriated, and vows revenge. Punch, a virtuoso of adorability, is eventually trashed by Elizabeth in a cruelly unpleasant way—and we’re apparently expected to think that’s just fine because…um, because the script says so.

Jason Segal is wasted in the underwritten part of the school phys-ed coach. But John Michael Higgins, a sharp supporting-character specialist, has some funny scenes as the school principal (whose obsession with porpoises, unfortunately, has no payoff); and so does Phyllis Smith, playing a shy, well-meaning teacher named Lynn. Unfortunately, Smith is at the center of a lame, dated pot-smoking scene, in which she takes the first puff of her life and immediately scurries off saying “I’m gonna go get a hot dog.”

The picture is a lumpy chowder of improbability. There’s a desk-switching plot point that’s startlingly dumb; and when Elizabeth decides—for devious reasons, of course—to turn into a real teacher, and start schooling her students in the riches of To Kill a Mockingbird, this sudden eruption of literary cultivation comes out of nowhere. And when she gives forth with the line, “That’s my spiel, as the Jews say,” you just want the movie to stop, and go away. Unfortunately, that leaden remark crops up rather early on.

Kurt Loder is a writer living in New York. His third book, a collection of film reviews called The Good, the Bad and the Godawful, will be published in November by St. Martin’s Press.