Being a veteran of the botting world here are some tips and tricks. Some are common sense but want to make this as comprehensive as possible.
Intro:
Blizzard uses big data analytics and customer reporting to catch botters. For the analytics portion they crunch numbers that flag an account. For example if your account is active 19 hours a day you will get points added to your account. Customer reports add more points. Unusually interactions methods get another. Once you accumulate enough points you are flagged for investigation. Investigations could be turning on various anti cheat processes to record whats in your memory or what processes are running. Other investigations teleport your toon or get them stuck to see how they respond. So to sum up, Blizzard crunches numbers associated to various activity to see if you are a worthy target for investigation by live people. There are automatic methods to catch botters that are in use. Usually perm bans involve a direct blizz employee investigating your toon and temp bans are generally automated systems.
Tips
Bot a realistic number of hours. Include actual playtime into the calculations. For example don't bot for 9 hours then play for 6.
When botting use plugins that mimic player behavior if at all possible. There are some risks with these so use them with caution. Thank you to the authors of the plugins, great job
http://wrobot.eu/files/file/519-me-human/
http://wrobot.eu/files/file/515-random-jumper/
http://wrobot.eu/files/file/359-whisper-reply/
http://wrobot.eu/files/file/303-move-during-combat/
Play your bot if at all possible. Many people have farm toons so its ok not too however playing your bot will remove analytics against it. Just queue up for some dungeons a couple of times a month or so.
If you are dungeon botting (just don't, dungeon botting will get you caught so quickly) then farm with the bot or quest, do something different.
Bot in the after hours on your server. Botting during prime time causes two issues.
First, you will be very inefficient with your botting since so many others are farming
Second, you increase the risk of getting caught
Name your botting toon something generic and something that isn't easily remembered. If you name your toon SirButtFarmer that will get a chuckle and then reported once someone sees it a billion times running around a zone. Name it something close to a popular guild on your server, so it will blend in.
Create your own routines. For gatherer go to product settings then profile creator. Click record path, run around the zone (use a farming addon like FarmHUD) and stop recording when done, save and use it.
Blizz doesn't flag toons running specific paths or locations. It isn't practical to record that much data for so many toons. They would need to store, process and analyze tremendous amounts of data points and the costs make it unjustifiable. So its ok to run shared profiles.
Use the wonderful relogger application. Seriously the thing is AWESOME. See more on that below
As said previously don't dungeon bot, I see so many bad dungeon botters, you will get reported and you will get caught.
When a new blizz update lands, hold off on botting for 24-48 hours. Sometimes updates are to catch certain things or add world bosses that can break paths. Be careful
Watch your bot on new profiles and check in on it. Once you run it for a few days with close eyes you can leave it running for long periods of time.
Relogger
I run relogger as my tool for farming, its amazing. For example here is what you can do:
Run a task such as gatherer for X amount of time.
Run a second task called wait to close wow and wait. This wait could be a break, such as I just played wow for 3 hours time to get up and stretch for 15 minutes. It makes you appear human
Run a task to log back in and run your farmer.
Then add another task to wait again this time to sleep for 7 hours or so.
Do more farming and eventually but in a final wait and list the time at 9000-9999 which will keep it closed. That gives you time to manually shut down operations or do whatever after the maximum time has been reached.
See the picture forming here. Use relogger, its a powerful tool that will maximize your botting time while keeping the analytics down against you. There are numerous excellent tutorials on the forums so just search for them.