It moved them out of the bottom three at Cardiff's expense following a horrendous week which had included cup hammerings against Nottingham Forest and Manchester City.
McDonald hopes the victory starts an upturn in fortune, and made it clear Allardyce never considered walking away despite the flak that has come his way in recent weeks.
He said: "Sam has never quit anything he has done and why should he? He knows what he is doing and how he wants the players and it showed today that the players are firing on all cylinders for him and have come out of the bottom three with a clean sheet and two goals.
"Hopefully this is the turning point for everybody's confidence and for the club to get higher in the league and to try and get higher in the league with a few more victories."
Aside from Tomkins' red card, when he picked up for a second yellow card for a foul on Fraizer Campbell having earlier being booked for dissent, the low point for West Ham was losing Guy Demel to injury early on.
The Ivorian defender stayed down after being caught by team-mate Roger Johnson's elbow, and McDonald confirmed he had gone to hospital for checks after receiving lengthy treatment.
He said: "Demel had a bad whack on his head off Roger Johnson's elbow. We are slightly concerned about him and he has been taken to hospital and we are waiting for the doctor to come back to say how he is but I am sure he will be fine."
McDonald also hopes Carroll's return from a foot injury - the striker set up Noble's goal - will see the England international start to find his best form.
He said: "Andy took a long while to warm up which is only natural. The crowd were fantastic but they were great today and hopefully they will travel back to London with a huge smile on their faces.
"They have seen players who want to wear the shirt and give everything and Andy typified that when he came on, holding the ball up flicking it on to make the pass for Mark Noble which is great."
Cardiff are now in the bottom three for the first time this season as new boss Ole Gunnar Solskjaer's Premier League bow fell flat.
And the Norwegian was at a loss as to why it had taken his side until the second half to get into the game.
"The second half was the way we want to play, we had twice the possession and shots of them but the first half was surprising, we did not have any energy or enthusiasm," he said.
"The game was broken up by a bad injury but we never got going first half."
However, the former Manchester United man is not unduly concerned by the Bluebirds' position ahead of trips to Manchester City and Manchester United.
He said: "You have to play those teams anyway, if we get something against them we will be flying. We are five points off 10th so it will be very competitive.
"It is very tight from the bottom up to Hull, it is a league in itself. We just need to keep nicking points where we can and we have plenty of games at home against sides who are 10th and lower. So we have games where we can get points."
- Sports & Recreation
- Andy Carroll
- James Tomkins
- Manchester City
- Mark Noble