Why Transformers were rubbished by the critics and acclaimed by the public ?

Transformers: Dark of the Moon is a 2011 American science fiction action film directed by Michael Bay and based on the Transformers toy line. It was the 10th film to reach 1 billion dollars and today , it is the seventh highest grossing in history, even being rubbished by criticism. 
The movie was criticized because it had poor perfomances, excessive time,indifferent script and confusing action. But it was also praised because of the special effects and originality.
We can say that the critics want to see a movie with a good and realistic plot and they are not fond of over-the-top Science fiction movies with a simple story,like Transformers. However, the general public doesn’t have this preference. Let’s be honest, who doesn’t like to watch giant robots exploding each other?

Thales, Rafaela and Victor