So, I'm at the battle of Whiterun and for some reason, I keep failing "Defend the Barricades". It seems almost impossible since I only have ~16-20 percent of the attackers defeated when the objective is failed.
Don't worry about it; "Defend the Barricades" is just an objective; if you don't kill the 100% of stormcloaks you need to before the barricade is breached, the objective fails but then you get an objective to "Defend the drawbridge" etc. Basically you just keep falling back defensively until you've killed enough stormcloaks.
Incidentally, you can run out in front of the barricade & take them on close to where they spawn, somewhere near the stables. They'll usually go after you before trying to hit the barricade or the town, so you can keep the fight away from the city for the most part.