I do not believe Moliere is necessarily attacking religion as much as pointing out flaws of people who follow blindly behind false prophets and forget to recognize the true meanings of religion itself. He makes valid points as to what makes up a true devote of heaven and compares them to the performance some people project to “prove” they are devoted and more spiritually involved than others. In Act I Scene VI, while Cleante expresses his concerns to Orgon about his utter willingness to believe and follow Tartuffe without fail, Orgon explains his case of how he came about knowing this holy man and what great man he truly is.
He speaks fondly of Tartuffe’s protectiveness over his wife, his refusal to take all the money Orgon offers him, how he gives a portion of his money to the poor, his feelings on how people should be, and way he made him realize that the possessions in his life are meaningless. Cleante then counters making the points of how a true believer in heaven wouldn’t go around speaking or publicly showing off their humbleness and their sincerity, rather they would keep it to themselves and that would prove they were true devotes of God.
The concern Molerie is bringing to the forefront of Tartuffe is the effect of worshiping false idols who claim to be true believers may have on people who follow blindly behind them. This play seems more of a religious cautionary tale rather than an attack on religion. I understand Tartuffe as being a play to bring people back to a simpler and truer way of believing in heaven, helping the audience/reader acknowledge how charlatans may be detrimental to their lives.