Al Haafidh ibn Hajar states while commenting on the Hadeeth:
"Every deed of the son of Adam is for him except fasting; it is for Me and I shall reward for it…" [Collected by both al Bukhaaree and Muslim]
Al Qurtubee stated: 'Since all forms of worship can be affected by Riyaa, and the worship of fasting cannot be seen by the mere practice of it except by Allah, Allah attributed it to Himself and this is why he said:
"…He forsakes his pleasure for My sake..."
Ibn al Jawzee stated: 'All acts of worship are visible by merely practicing them, and little of what is visible is safe from mixing [of intention], in contrast to fasting.'
Al Maaziree was pleased with this statement and al Qurtubee agreed with it explaining that all the actions of the children of Adam are prone to be affected by Riyaa, so they were attributed to them. This is in contrast to fasting, for one who is not eating because of not being hungry is outwardly identical to one who is not eating as an act of worship.
I say [Al Haafidh ibn Hajar]: The meaning of the negation; that there is no Riyaa in fasting, is because Riyaa cannot enter fasting by the mere practice of it. However, Riyaa can enter it by speaking about it, such as one who fasts then tells others that he is fasting, Riyaa can enter it from this angle. So Riyaa can enter fasting only by informing others about it, in contrast to the rest of the acts of worship – Riyaa can enter them by merely practicing them.
Some of the Imaams attempted to make an analogy between fasting and other forms of worship; saying that mentioning/remembering Allah by saying 'Laa Ilaaha illah Allaah' is like fasting, in that it is possible that Riyaa does not enter remembering Allah by saying 'Laa Ilaaha illa Allaah' since it only requires the movement of the tongue and not any other parts of the mouth , so a person remembering Allah can say it in the company of others without them noticing it.
 To further elaborate, as this was discussed before the starting point of the article; you cannot really show off by merely fasting since nobody knows that you are fasting except Allah. In other acts of worship, such as Sadaqah for example, it is liable that Riyaa enters it from the moment a person acts upon it (gives someone Sadaqah), as people can see this action and the person may be intending that people say he/she is generous and often gives the poor for example, or this may occur after he/she notices people looking. The point is, since it is a visible act, by merely practicing it, it is liable to be affected by Riyaa, in contrast to something that people can't see such as fasting.
 i.e. It can be done while the lips and the jaw remain still and only the tongue - which is hidden - moves, so if it is practiced in this manner, it is like fasting whereas it is a form of worship that cannot be seen by anyone other than Allah and therefore Riyaa cannot enter into it by merely doing it.
Note the benefit that the statement of Tawheed, the statement of Ikhlaas (sincerity), can be said without any visible parts of the body moving...it has been made easy for the statement of sincerity to be said with sincerity, without anyone knowing one is saying it except Allah.