You don't have to plug in during intensive tasks. You can if you prefer, but it's not necessary.
You don't need 3rd party apps to manage memory. OS X knows how to manage your memory, without your interference.
Caches exist to improve performance. Cleaning them regularly when there isn't a specific problem with a specific cache will only degrade performance while the caches are being rebuilt.
Emptying the trash has no impact on performance.
Don't do this. Some people repair, or recommend repairing permissions for situations where it isn't appropriate. Repairing permissions only addresses very specific issues. It is not a "cure all" or a general performance enhancer, and doesn't need to be done on a regular basis. It also doesn't address permissions problems with your files or 3rd party apps.
There are times when repairing permissions is appropriate. To do so, here are the instructions:
If repairing permissions results in error messages, some of these messages can be ignored and should be no cause for concern.
Unnecessary, and if you routinely power off every night, OS X maintenance scripts will never run. It's perfectly fine to use sleep mode, plugged in or on battery power.
That is false and very bad advice. Batteries are intended to be used. Rarely running on battery power is a good way to greatly reduce your battery's useful life.
Current Apple notebook batteries are designed to retain at least 80% of their capacity up to 1000 cycles, and they can still be used below 80%. Batteries will die over time, whether they are used or not. They die quicker if you don't regularly run on battery power.
Your two statements contradict each other. It is not best to run most of the time plugged in.
Also unnecessary. Macs are designed to safely operate within Apple's operating limits, which are 50° to 95° F (10° to 35° C). This includes while charging.
Run on battery whenever you need to and plug it in whenever you can. You can plug or unplug any time you need to, regardless of the charged percentage, and you never need to completely drain your battery. Just make sure you don't run on AC power exclusively, as your battery needs to be used regularly to stay healthy.
The link below should answer most, if not all, of your battery/charging questions. If you haven't already done so, I highly recommend you take the time to read it.