Pity the poor crime novelist as they watch the final episode of Line of Duty on Sunday night. Whereas the rest of us will be asking “who did it?” the question on their lips will be “how?” And not: “How will the balaclava-clad killer get caught?”, but: “How did writer and director Jed Mecurio get away with a plot so full of holes it could double as a colander?”

With the subtlety of a size nine boot, each episode has been riddled with inconsistencies that would never pass muster in a novel. From the fact that women being brutally killed seems to be less of a priority than nailing dodgy DCI Roz Huntley, through to a rookie member of the AC-12 anti-corruption team blithely scribbling his password onto a Post-it note. Or the inability of Huntley’s colleagues to notice her suppurating wound, or that all the CPS needs to prosecute is a copper with a hunch, as happens with hapless Polish cleaner Hana Reznikova.

These are the tip of the iceberg in a story that has seen: Huntley return to work immediately after a hand amputation and carry on as if all she had lost was a toenail; coincidences piling up like corpses in Midsomer Murders; AC-12’s Kate Fleming go undercover without detection in a small regional crime squad; and her hapless colleague Steve Arnott return to work with no more hint of his transition from feet to wheels than a few dirty dishes and a messy flat. No wonder one bestselling crime writer confides: “I wouldn’t get away with any of this – my editor would be all over that shit.”

Even fans among crime writers admit that credibility has been stretched to breaking point. “There are things that make me shout at the telly – no self-respecting copper would write down his password, for example, and then fail to mention, when questioned, that he’d given it out,” admits Mari Hannah, whose Kate Daniels detective novels are in production with Stephen Fry’s company Sprout. Though she hastens to add that Line of Duty is for her “the best British crime drama I’ve seen in years”.

Hannah’s agent, Oli Munson of AM Heath, says the reason shows gets away with infractions that would leave novels languishing on the slush pile is that there is more to distract the viewer on TV than in a novel. And, he adds, the medium demands speed over substance, to keep audiences on the edge of their seats. “In TV drama it is a question of pace. You have to keep the audience gripped,” he says.

Crime author Susan Wilkins, who also created and wrote the BBC cop show South of the Border, agrees. “As someone who has moved from TV to books, I found that what you get in TV is more reliance on pace. You need shocks that impact on the audience,” she says. “It is a much more visceral medium.”

Scriptwriters also benefit, according to agent Jane Gregory, whose clients include Val McDermid and Minette Walters, because the sheer number of characters on screen in a drama means it is possible to distract attention from the unbelievable. “We are much more forgiving of television than novels because we are concentrating more when reading a novel,” she says. “In TV, you have more to take your attention away from how ludicrous the plot may be.”

Screenwriter-turned-novelist Isabelle Grey, whose TV credits include The Accused, blames the rivalry between on-demand streaming services such as Netflix and traditional broadcasters, for the rise of ridiculous crime dramas. “The data-mining that goes on in TV is completely different to the way books are handled,” says Grey; whereas bestseller lists are the most important source of market research for fiction writers, in TV everything feeds into the writing process – from Twitter trends to research that reveals when viewers are most likely to leave the room to make a cuppa.

There is nothing really about Roz as a mother until they need to make a plot point ... you can’t do that in a novel.

Sarah Hilary, author

On top of that, she adds, for screenwriters, it is the actor who engages the viewer, not simply the writer: “The plot [in TV] is really a McGuffin, even in something like Line of Duty, which is really about the characters in AC-12, like [department head] Ted Hastings, and how they develop,” she explains. “In that way Roz Huntley’s guilt or innocence is a McGuffin.”

In this, series like Line of Duty and Broadchurch have more in common with a soap than a novel, because readers of crime invest not just in the protagonists, but the detection and resolution. But even as soap, Line of Duty frustrates crime-writing critics. “You need entry points into characters’ lives, whether on TV or in a book,” says Sarah Hilary, whose novels include Quieter Than Killing, the latest in the DI Marnie Rome series. “The problem with Line of Duty is that the entry points have been broken down into simplistic characters, so Roz is an ‘angry feminist’, who never interacts with her children. There is nothing really about her as a mother until they need to make a plot point and she declares how much she loves her family. You can’t do that in a novel. And, I would argue, you can’t on television.”

None of this means crime novelists and literary agents will be switching over on Sunday night. Like the rest of the millions watching, they will be glued to their seats – perhaps not to learn whodunnit, but to see how Mecurio digs himself out of holes that have left them shouting at the television for the last six weeks.