Every plot, no matter its genre, will have a good guy and a bad guy. Our hero/heroine is wanting to achieve something and our villain is trying to achieve the opposite. Good versus evil. Clear sides. Excellent.
No one is real life is all good or all bad. I've encountered characters in books that were so pleasant, so handsome, so good, it made me want to hit them with a shovel. I understand the heroine perceives the object of her affection as wondrous and desirable; but when everyone in the story seems to have the same opinion, I start to feel just a tad nauseous.
No detective (remember I write mysteries) is going to pick up every clue every time. Not every decision they make, every path of investigation they choose to follow, is going to be the right one. People have their own agendas. People can rub people the wrong way. A perfect detective is a bland detective.
No villain is out and out evil. Think about Blofeld, the Bond villain who had plans for world domination. (But then again, he was a Bond villain, those had to be his plans) I don't recommend inviting this guy over for a dinner party, but he wasn't all bad. He was very fond of that white cat.
Every writer has a myriad of things to worry about. The plot. The pace. The setting. The actual vocabulary. The grammar. It's not surprising that sometimes character complexities get lost in the shuffle. It's so much easier to write a character that's all good or all bad.
Resist the temptation.
I believe the more realistic the characters, the more enjoyable the book. Write characters who make mistakes, who occasionally over-indulge, who get jealous or who suffer from a bit of an inflated ego. Give your hero a chance to be bad and your villain a chance to be good.
After all, they're only human.