I think this question might be a better fit for Writers.SE, and wouldn’t be surprised if this gets migrated there. As Kris mentioned, this is more of a writing question than a language question.
Those he said / said she constructs are used in literature so that readers can discern which characters are talking. In that context, I think authors simply use whichever format interferes least, and flows best, with the dialogue.
I can’t recall any hard-and-fast rules for when to use one format over the other, but I might venture to make a few general assertions.
Your format #1 is often used when the author wants to let the reader hone in on who is speaking:
A woman in the back of the room interrupted, “What about the crisis in Europe?”
Formats #2 and #3 are used when the author would rather focus attention on the remarks themselves:
The two detectives surveyed the messy room. Obviously, Laura had put up a struggle, and a good one at that. The hardened veterans had seen plenty of staged crime scenes before, but this was the real thing. “She must’ve put up quite a struggle,” Dave said.
“Yes,” mumbled Sam, “she wasn’t going down without a fight.”
I also think that the inversion of format #3 is seldom used with pronouns, but not uncommon at all with proper names:
“It’s all over but the cryin’,” he said.
“Yes – all over but the cryin’,” echoed Paul.
Best Answer
Either form you gave is fine. Moreover, either of these forms can also be used in the middle of a quote, too:
In writing, you probably want to avoid using the same form, in the same relative location, over an extended dialogue. That would get wearisome:
Instead, something more like:
You get the idea. (If I delve into it any more deeply than that, this'll get migrated to Writers.SE.)