The career trajectory of the four wisecracking cartoon penguins introduced as minor characters in “Madagascar” has been one of meteoric ascendancy, with return appear­ances in two sequels, a couple of stand-alone shorts and a television show. It’s not an unusual path in animated Hollywood. We’ve seen it before with Scrat, the saber-toothed squirrel from “Ice Age,” who parlayed a cameo in the first film into a cottage industry of increasingly annoying shorts and a camera-hogging turn in the second sequel, “Dawn of the Dinosaurs.”

But unlike that acorn-obsessed, chipmunk-cheeked, paleo-rodent ham, the Flightless Four known as Skipper, Kowalski, Rico and Private are ready for their moment in the sun. “Penguins of Madagascar” is a delightfully silly star turn for this quartet of absurd little birds, who operate as a team of commandos.

There are several reasons why this works.

First is the voice talent. Although none of them is a marquee name, the actors who bring the penguins to life — Tom McGrath, Chris Miller, Conrad Vernon and Christopher Knights — do so with verve. (Special credit goes to Vernon, who voices the almost nonverbal, but nevertheless vocally expressive Rico, who is often shown coughing up indigestible objects that he has swallowed.)

Other notably funny turns in “Penguins” include John Malkovich and Benedict Cumberbatch. Playing to type, the A-list actors provide the voices for, respectively, a villainous, emotionally unstable octopus named Dave and a heroic, cucumber-cool secret agent gray wolf whose name is classified. (That’s right: The character’s name is never given — “My name is classified” he tells us, in Cumberbatch’s mellifluous British baritone — leading to some giddy “Who’s on first?” confusion.)

Which brings me to the real reason for the movie’s success: the writing of the story, which concerns Dave’s plot to kidnap penguins from all of the world’s zoos and turn them into monsters.

Fleshing out characters created by “Madagascar” directors and writers Eric Darnell and McGrath (whose voice propels Skipper’s MacGyver-like can-do spirit), the screenplay by John Aboud, Michael Colton and Brandon Sawyer has a fizzy, pop-culture pizazz, tempered by a distinctly vaudeville sensibility. It’s smart, but not brainy; dumb, but never inane.

Colton, who was an editor of the Harvard Lampoon in college, worked briefly at The Washington Post in the late 1990s before leaving to form the now-defunct online magazine Modern Humorist with Aboud. Their work with Sawyer, a children’s TV writer whose credits include the “Penguins” series on Nickelodeon, is perfectly aimed at the target demographic of silly but savvy 10-year-olds. One recurring joke involves Dave barking orders to his tentacled henchmen, leading to a series of increasingly nutty puns name-checking famous movie stars: “Nicolas, cage them!” “Charlize, there on the death ray!” “Drew, barry, more!”

It’s gloriously juvenile, but also very, very funny.

Other ingredients in this self-referential pop-culture puree include a cameo by the German director Werner Herzog, voicing the filmmaker-narrator of the penguin documentary that opens the film in Antarctica, where its prologue is set. Observing that our four heroes are “frozen with fear” on an icy precipice, Herzog orders his sound man to “give them a shove,” in order to increase the drama.

And increase it he does. One of those early scenes features a leopard seal eating a seagull. It’s an indication of the dark edge that will give the story its slightly grown-up astringency. “Penguins of Madagascar” is by no means inappropriate for kids, but there’s a coolly self-aware smirk to it that makes it palatable to people with driver’s licenses, too.

And, oh yes, the 3-D animation is a treat.

But the real charm of the film is its stars. As Skipper says, “A good plan is about more than effecty stuff and big words.” That’s equally true of a good movie.

★ ★ ★ ½

PG. At area theaters. Contains mild action and some rude humor. 92 minutes.