Don't break down your game to offense and defense like it's a separate thing. It's not so black and white: your offense is your defense and your defense is your offense. The bottom line is to keep it simple and focused.
Shadow boxing is a great way to practice alone. I know this is not breaking news, but you ALWAYS need to remember regardless of which solo boxing drill you're doing:
1. Focus on the technique and start slow. Instead of going fast and wild, focus on your posture and hip & shoulder positioning. Relaxed but controlled is the key.
2. Always keep "flowing". Every punch, duck, slip or step you do should open up another move. If you stumble, go slower. When your mind picks up the pace, your body will follow - not the other way around.
3. Visualize yourself fighting an opponent. When you throw a punch or combination, slip, duck or move out of the way afterwards. Don't just stand there and blink - you're gonna get countered!
4. Three 3 minute rounds of 100% focus and effort is better than 12 rounds of 70%. When you feel like you're losing your mental focus when shadow boxing or working the bag, do something else. For example, you can never do enough conditioning work