Factual error: Regardless of how bad an attorney he is, Ned Racine must surely know that his acquittal for murder is a shoe-in. It's very doubtful that the prosecution would have even held out for remand in his case, and in fact they probably would not have even charged him in the first place. The fact that his fingerprints are on Edmund Walker's glasses is irrelevant. He and Racine were seen in public together, notably in the restaurant, and he freely admits to being in Walker's house. He could have handled Walker's glasses on any one of these occasions. The conversation Racine has with Ted about building the firebomb cannot be used in court, as Ted fires Racine as his lawyer at his second meeting; everything from the first is covered by attorney-client privilege. Maddy obviously isn't around to give evidence, and the yearbook entry Racine finds throws suspicion on her (and away from Racine) immediately. There are no witnesses and no forensic evidence, in fact there is nothing to support the prosecution case except a vague suspicion based upon his having had an affair with the widow-to-be. No court in the US would entertain the case for a minute (yes, I am a criminal lawyer).
Plot hole: Considering the incredibly elaborate plans Maddy makes to have her husband murdered after having him sign a will she knows is invalid so he dies intestate and she - as his widow - gets his entire fortune, you'd think she would have worked out one little fact - Edmund Walker does not die intestate. It is established in the film that the dud will written by Ned Racine replaces a previous, valid will which bequeaths half his fortune to his niece Heather. When Racine's will is declared invalid under Florida law the previous will takes precedence and Heather and Maddy split the fortune. In no way will Maddy get the lot.
Factual error: Under US law neither Peter Lowenstein nor Oscar Grace would be allowed any level of participation in the investigation, arrest and prosecution of Ned Racine. Both have a highly visible social relationship with him, which disqualifies them from having anything to do with a criminal case against him. In fact as soon as he became a suspect in Edmund Walker's murder they would both be officially 'warned off' - told not to contact him again for any reason.