These are the rules I build by with regard to building turrets (these aren't written in stone, I do make some exceptions, but the ideal base location should allow for all of this IMO):
1. Build defenses so that they defend your more important structures such as telenodes, medistations, armories, and the reactor. Both turrets and teslas are worthless in and of themselves, but cost enough (outside of repeaters) that it is wasteful to build them to defend anything else.
The turret on the far right of the third picture is useless because it cannot help defend important structures (it is also unsupported by other turrets and and a pitiful LOS). Also, each group of turrets defend only a few critical structures, ideally, the turrets would be able to defend a larger portion of the important structures
2. Build turrets in such a way that they all support one another as much as possible. To this end, it is useful to build buildings that would block the turrets line of sight along walls, and especially in corners.
You have 4 distinct groups of turrets. The 3 by the reactor, the 1 by the armory, the 2 by the telenode, and the one lone turret in the alcove. Thankfully, the one turret by the armory can defend one of the turrets by the telenode from attack by the ledge and vice versa, but otherwise they are separated. IMO this is where spread-out bases tend to fail. Unless the turrets in each group are spread out relatively far, groups of two turrets or less are vulnerable to strafing. Your reactor is the *only* structure defended by turrets that cannot be safely strafed. Ideally all the turrets would be able to defend all of the other turrets, creating a base that works as a single unit. Together they stand, divided they fall.
3. Build turrets next to walls, larger buildings, or ledges that are unlikely to be used as attack routes. This prevents aliens from strafing them, moving in such a way that the turret is constantly spinning up, but never firing. Placing them too close to large buildings can leave them vulnerable to barbs, however.
Turrets and other buildings not built against some sort of barrier are vulnerable to circle-strafing, which means that even if they are defended on both sides, no single turret will retain LOS long enough to defend the unfortunate victim. Both of the glitched turrets suffer from this, although that does not matter so much, since there are simpler ways to strafe them.