Not long ago, I was critiquing a manuscript and found myself making the same comments over and over.
"Check Police Procedure." "Check Crime Scene Procedure." "Check Legalities."
The story was a thriller that relied heavily on two homicide detectives as supporting characters because they suspected the protagonist of a series of murders. That's been done before, and it still works...if you make the details believable. Unfortunately, the writer seemed to base her knowledge of police procedure on Mack Sennett films and Nancy Drew and The Hardy Boys.
Maybe the idea of the dumb cop started with Lestrade, the bumbling Scotland Yard officer in the Sherlock Holmes series, or the ineffectual Surete officer in Poe's stories starring C. Auguste Dupin, both of whom would make a rag doll look smart.
Remember the Keystone Cops? Lots of running and jumping and high-speed chases, but not much to show for it. The police in the early Hardy Boys books had names that showed they were the comic relief: Detective Smuff (I almost wrote "Smurf"), for example, and Chief Collig. They both exhibited epic laziness and slightly less impressive stupidity, but little else. They needed the teenagers to drag them in the right direction and hand them the solution to the case they didn't want to investigate in the first place.
Alas, the trope of the dumb cop has become a tradition more admired in the breach than in the observance. Too many contemporary stories still portray the police as idiots, and I stop reading when I encounter the first instance in a MS. Sometimes, I continue reading and suspect that these guys will turn out to be working with the bad guys. That still happens a lot, too, and it's legit if you do it well. But I will only keep reading if the writing up to that point is good. If the prose and the hackneyed idea seem to be a matched set, Sayonara Kid, have a nice day.
If the power of your story comes from the strength of your antagonist, it's no less true of the police as supporting characters. If they are going to be adversaries, major or minor, make them worthy ones. If they overlook major clues, contaminate crime scenes, fail to follow up on conflicting testimony and perform illegal searches, they undermine both your plot and your credibility. Your protagonist deserves better.
If the police are this stupid, how brilliant does your sleuth have to be to solve the case for them (See Holmes and Dupin, above)?
Remember the film version of The Fugitive with Harrison Ford? Tommy Lee Jones was the cop pursuing him after the train wreck, and I wouldn't have wanted him chasing me. Jones was smart, thorough, patient and funny. He looked at everything and missed nothing. We hear his admiration when Kimble (Ford) jumps off the dam into the roiling water hundreds of feet below to escape his pursuers. He even gets a funny sidekick who asks, "Can we go home now?"
He kept his mind open and recognized more and more evidence suggesting that maybe Richard Kimble didn't kill his wife. And he helped the innocent man clear himself.
Jones's character strengthens the story in several ways. First, he adds another layer of tension because Kimble is caught between two forces, the strong and capable law enforcement officers and the hidden evil of the real killer. He gives the story more credibility, too. If a smart cop like this guy thought Kimble was guilty, the evidence that convicted him had to be pretty damning, didn't it? That strengthens the real killer again. Kimble, an escaped convict looking at a death sentence, still doesn't kill anyone to escape, and that makes him look more noble, too.