If you’re going to make a highly verbal New York comedy, you couldn’t do better than take Woody Allen as a model, and Chris Rock has clearly used his films—especially “Stardust Memories” and “Annie Hall”—as inspiration. He even names the protagonist Andre Allen. But “Top Five” is as insular as Allen’s movies, which appeal to a small but distinct segment of the audience, are: it’s just that the part of the audience that will appreciate its peculiar vibe—more Tupac than Bergman—is different, and probably larger. And while the movie is fitfully funny, it’s decidedly uneven, and runs out of gas toward the close.

In addition to writing and directing the movie, Rock stars as Allen, an erstwhile A-list stand-up comic and Hollywood star who’s fallen on hard times. He achieved screen clout with a series of dumb but popular action comedies in which he played Hammy, a cop who for some reason was dressed in a bear costume, but his drug and alcohol-induced antics—particularly a bad night in Houston, which saw him arrested for rape—ended that run. Now clean, he’s decided to go the serious route, starring in a historical period piece called “Uprize!” about the Haitian revolution that he’s come to NYC to promote for opening day. He’s also committed to a televised wedding with Erica (Gabrielle Union), a beautiful but ambitious reality-show star who helped him get off the booze and coke. But his movie—for which we see billboards, along with some ludicrous clips—and the wedding planning are stress-inducing, since the picture is getting panned and shows no box-office muscle against a new Tyler Perry “Madea” outing, while Erica’s completely taken over the nuptial plans to serve her own professional interests.

All this comes out in driblets and digressions as Andre is interviewed by reporter Chelsea Brown (Rosario Dawson) for a spread in the New York Times. He initially agrees to the day-long session reluctantly, since the Times’ film critic has blasted him over the years, but as their time together passes the two open up to one another, with revelations that both bring them closer but also threaten to derail what’s obviously becoming a budding romance. Naturally both of them come to terms with the crises that crop up in their respective lives, and ultimately Allen learns much the same lesson Sullivan did in Preston Sturgess’ classic comedy—that being funny isn’t such a bad thing, after all.

Would that “Top Five” were all that funny itself. It tries, to be sure—Rock peppers the script with sharp lines and amusing bits of business , and delivers his own dialogue in his customary rapid-fire style, which one supposes can be taken as a kind of acting. And the satire of Hollywood and reality-show TV is something almost anyone can relate to, even if it’s pretty broad, and awfully mild. There are also cameos by people you expect a lot from—Jerry Seinfeld and Woopi Goldberg, who come through in style, and others you don’t—like Adam Sandler, who nevertheless delivers. But there are also sequences with folks you look forward to seeing that don’t work terribly well—like the Houston flashback with Cedric the Entertainer, who, apart from a single gag about coat hangers, doesn’t bring much to the table (though the coarseness might appeal to some), or the short conversation between Rock and Kevin Hart as Andre’s agent, which comes off like bad improv.

Far better is the sequence where Allen takes Brown to visit his family in the projects, where, among others, Tracy Morgan shines as loquacious layabout and Ben Vereen shows up as an insistent old fellow whose identity comes as a shock. The entire scene is one of the few that combines drama and comedy in a fully satisfying way. But it will also test your familiarity with hip-hop culture, since one of its major bits involves various people spouting the names of their five favorite rappers (thus giving the movie its title). The same emphasis comes up in a bit toward the close, too, with a surprise cameo in a jailhouse scene. So be forewarned: if you know nothing about hip-hop, some of the movie will be totally unintelligible to you.

Too often, moreover, the film’s attempt to hit one out of the park goes foul, especially when it reaches for something like depth. That’s especially the case with the big revelations about Chelsea’s career toward the close, which are so journalistically absurd that they take the script into the realm of fantasy, and even more with a twist concerning her boyfriend Brad (Anders Holm), which not only trades in stereotypes but involves a flashback even more unpleasantly raunchy than the one with Cedric. Throughout, however, Manuel Alberto Claro’s widescreen cinematography exults in the New York locations, and Anne McCabe papers over the rough patches with her crisp editing.

With all its flaws “Top Five” represents a considerable advance on Rock’s previous writing-directing-acting efforts, “Head of State” and “I Think I Love My Wife.” In that company it certainly ranks first. On any other list, though, it would have trouble cracking the top fifty, let alone the top five.