In the course of reading Shamus Young's (brilliant, illuminating and on the nose) analysis of the Mass Effect game trilogy, I've stumbled upon the following Tolkien quote he uses to illustrate some problems with the franchise, that I think can also serve as useful advice:
J. R. R. Tolkien said:
“[The Author] makes a Secondary World which your mind can enter. Inside it, what he relates is ‘true’: it accords with the laws of that world. You therefore believe it, while you are, as it were, inside. The moment disbelief arises, the spell is broken; the magic, or rather art, has failed. You are out in the Primary World again, looking at the abortive little Secondary World from the outside.”
J. R. R. Tolkien
Be consistent with your story, and mindful of suspension of disbelief.
This is a more general rule to the "don't do the Deus Ex Machina thing", as that's one possible way of destorying immersion by breaking your own established rules.
My deep seated belief in the quoted concept is also the reason why phrases like "the story has fire breathing dragons/space aliens/telepathic mole people, and THAT detail is what makes it unrealistic? Really?" send me into murderous berserker rage that wouldn't stop until the origin of the phrase has been thoroughly verbally beaten and humiliated.
EDIT:
Another important principle I've remembered is "show, don't tell". Don't say "this character is brave" and leave it at that, rather convince the reader of this truth by having the character do something obviously brave.