An important note: wall size has nothing to do with espionage. It is a good deterrent, though.
Spy success % is determined by town size and # of spies in town.
On alpha, I have all my towns lvl 23 or better, and all hideouts lvl 25, with 20 spies remaining in the defense of the town (anti-espionage). I also have lvl 20 walls just in case someone gets a spy in and can see what I have built.
If people can't see what you have in your towns, they're less likely to attack.
Another point, though, you still need a decent generals score. People can research how big your army is through the highscore panel by searching you and looking at your Generals score.
What I do is keep most of my army in 2 towns - one at either end of my empire. That way, I can attack easily in either direction. The rest of the towns have 20+ spies in town to keep people from knowing they're poorly defended. =)
Oh, and btw, I never get attacked.
