It's easy to see why this movie succeeded after the failure of the first Star Trek film: "The Wrath of Khan" aims very low, so it can't miss. The story is instantly familiar from classic Westerns and adventure stories, the drama is mundane and domestic, and there's lots of action. Don't look too closely, or pull too hard on any loose threads, or the whole thing will unravel.
Nicholas Meyer took over the franchise with this movie and decided that the whole "exploring space" thing was too hard to get a handle on. Instead, he brought back a villain from the old TV show and had him chase Captain Kirk around in circles for the better part of two hours. Along the way there's a bit of melodrama: Kirk's midlife crisis, an old flame, and an estranged offspring, as if his life weren't complicated enough already. The old gang comes along for the ride, even though few of them have any excuse for being there. (It's worth mentioning the delightful irony that Meyer, who never served in any military, introduced the silly space-navy look to the franchise in this film, while Gene Roddenberry, the notorious peacenik, was a decorated bomber pilot in WWII.)
I won't dwell on plot holes, because there are too many of them. If you like "Wrath of Khan's" blend of action and soap opera, those little inconsistencies and mistakes will hardly matter to you. Other mistakes are bigger and more bothersome: the Genesis Device that Khan wants to get hold of is no more than a MacGuffin, whose duty it is to drive the plot and explode when necessary. (Khan's quest for revenge fulfills similar requirements). The terraforming angle pops up as an obligatory piece of science fiction paraphernalia, mostly so that Doctor McCoy can compare science to "playing God", as if that hadn't been done a million times before. The dialogue is stilted and cluttered with shout-outs to Charles Dickens and Herman Melville, perhaps to lend an air of dignity, and the acting veers woozily back and forth between hammy and wooden.
The music is superb, and does most of the film's hard work. Without James Horner's nautical score, there would hardly be any suspense or excitement during the many space battles in the final act. The special effects are quite decent, even the ones that aren't nicked from the previous movie. If it weren't for those two things "The Wrath of Khan" would feel too much like a TV film -- above average, but not nearly as good as the show it was based on.