"It is not for the idolators to maintain the Mosques of God, themselves bearing witness upon their (own) selves against (their) infidelity; These it is (whose) deeds are made in vain, and in the fire (of Hell) shall they abide." (Qur'an 9:17)At the end of the battle of Badr, Abbas, the uncle of the Holy Prophet and others, were taken captives. The other Muslims admonished the captives and Ali-ibne-Abi-Taleb is reported to have said that "Abbas was treacherous to his blood and flesh and had come to fight his own nephew, i.e., (The Holy Prophet)." To which Abbas replied, "You see our evils but not our virtues". Ali asked what those virtues were. Abbas said, "We take care of the Holy Ka'ba and hold it in great regard, we supply water to the pilgrims, we liberate the prisoners." In reply to Abbas this verse was revealed (1). It should be noted that whatever amount of good one might have done in one's life, 'Kufr', i.e. 'Infidelity' renders all the good done, as null and void.
The idea is to assert that upkeep of devotional precepts of Islam keeps the mosques or places of worship of God really alive, and not merely erecting the magnificent edifices or any amount of frequent visits nor the apparent maintenance of the visitors of the mosque. From the story referred to in this connection, it proves beyond doubt that Islam values the sincere devotion of man to the cause of Islam more than any amount of rituals, and/or the show of any religious pomp and glory. On this basis, Islam never encourages building of magnificent and golden architectures of worship or the guilding of Qur'an and the sacred objects. Islam considers the whole globe as the one Mosque of Worship of God, for man.
Islam wants a Muslim to be clean in his heart, body, dress, place of living, place of worship; clean in his word and action in his dealings with his people. (Agha Pooya)
(1) Manhajus Sadiqeen (Tafseer)(Persian)
Umdatul-Byan - Commentary by Maulvi Syed Ammar Ali.