Grade: B+

“The Guest” may be trash, but it’s grade-A trash, an absurdly enjoyable piece of pulp hokum that’s a throwback to some the best B movies of the seventies and eighties. Adam Wingard and Simon Barrett came a-cropper with “You’re Next,” trying to make both a homage to and a send-up of a home-invasion thriller akin to Wes Craven’s similar take on the slasher movie in “Scream,” but here they hit the target straight-on, at least until the last reel. John Carpenter should be smiling.

Though the models Wingard and Barrett embrace here are legion, the main one appears to be “The Stepfather” (Joseph Rubin’s excellent 1987 original, not the misguided 2009 remake), in which a family is invaded by a psychotic pretending to be the perfect dad. Here the family, the Petersons—Spencer (Leland Orser), Laura (Sheila Kelley), bullied son Luke (Brendan Meyer) and older sis Anna (Maika Monroe)—are mourning the death of their oldest child Caleb, a soldier killed in Afghanistan. And the stranger who knocks on their door is David (Dan Stevens), a handsome fellow who claims to have been Caleb’s squad mate and best friend, come to deliver his buddy’s final words to each family member.

Everyone but Laura seems to harbor doubts about the wisdom of inviting David to stay with them, but before long he’s taken up residence in Caleb’s old room and virtually taken his place. And he soon ingratiates himself with the other members of the family, too, even if they don’t always realize the lengths he goes to in order to help them. The boss who was promoted over Spencer meets an untimely end, and an immediate replacement is needed. Anna’s unreliable boyfriend Zeke (Chase Williamson) finds himself in serious legal trouble. And the jocks who have been harassing Luke get their comeuppance in a showy action set-piece that certainly confirms David’s special ops bona fides. (Still, Anna remains suspicious of him, just as Jill Schoelen’s Stephanie did of Terry O’Quinn’s Jerry Blake, and her investigations will have serious ramifications.)

David’s martial skills also come into play when “The Guest” takes a turn from creepy suspense thriller to full-blooded (in both senses of the term) conspiracy mode with the arrival of Carver (Lance Reddick), chief enforcer for some hush-hush corporation with close government ties. He enters with a complement of SWAT-type underlings and serves not only as the chief pursuer of David and general clean-up man, but as the explainer-in-chief of everything that’s been going on. That fact that more than one hole remains in his exposition when the curtain comes down—following a hilariously over-the-top face-off in what amounts to a Halloween haunted house and the obligatory twist ending—isn’t of much significance.

Neither, to be honest, is the entire movie. And its final stages, in particular, begin to run around in circles, with the haunted house sequence suffering from repetitiveness that lessens the impact as it wheezes on. (The last-minute quasi-revelation, moreover, will come as no surprise to anybody brought up on these sorts of potboilers, though one hopes it doesn’t forecast—or is that gorecast?—a sequel.)

But it’s all in bad fun, and if the movie loses some steam even as it grows more and more exaggerated and frenetic, it’s a fault that’s easy to forgive. Overall it provides the agreeable frisson of a charged amusement-park ride. And one thing that certainly remains top-drawer to the very end is Stevens’ wittily knowing performance. The ex-“Downton Abbey” heartthrob gets his Southern accent right, but more importantly he manages a perfect mix of the charming and the slightly sinister. The only other cast member who scores strongly is Meyer as Luke, whose longing to be liked leads him to an unwise confession. But Monroe, Kelley and Orser provide near-parodies of B-movie turns as the rest of the Peterson clan, while Reddick is all firm-jawed intensity as the man with the answers. The technical side of things is hardly big-budget slick, but it’s leagues ahead of the ragged look of Wingard’s earlier efforts, and Robby Baumgartner’s cinematography captures the glossily vulgar look of the ‘70s and ‘80s. A special nod is due Stephen Moore’s score, which earns a laugh as soon as the title appears on the screen and uses old tropes cleverly after that.

Moviegoers unfamiliar with the pictures “The Guest” is acknowledging won’t enjoy it as much as those who can check off the references, which is part of the fun. But overall it should be welcomed as proof that sometimes they can make them the way they used to—and we can be grateful for that.