When we say "successful" with regards to The Avengers, I don't think we're strictly talking money. This movie was going to make tons of money regardless of the director. What Whedon is really good at is bringing characters from diverse backgrounds together into one story and making it work in a way that feels
right. He gets what makes actors and characters tick, and he is great at making them work well together.
Obviously Whedon is not the sole reason for this movie's success. It was going to be successful with or without him. What Whedon managed to do is make this movie live up to, if not exceed, expectations. This movie could have easily been a huge critical disappointment given how built up it was.
We really shouldn't be questioning Whedon's role in the success of this film. We should be wondering if a different actor can pull off an equally awesome movie.