Main point summary
Worthless "religion" is one that ignores living out the Word of God and allows the World to direct and lead their "religion" instead.
To visit those that are afflicted and rejected by society. This is who we were before the gospel saved us!
Essentially, "In case you still haven't caught my hint... If you STILL think that you are religious after all that I said in verses 19-25...."
Are you allowing the Word to push out the world and it's influences in your life?
May our faith and walk never be counted worthless before the Father!
Would the Lord say your religion/faith is worthless? How do you live out the word? How are you lacking?
Theme of self-deception (v.22)
If anyone thinks he is religious
If any of you think that they are religious [if you think that you like the "doer of the word" (v. 22)],
q and does not bridle his tongue
yet you do not even control your tongue
but deceives his heart,
but you lie to your own heart [you are only a hearer, deceiving yourself. You are the man who forgets himself after looking in the mirror intently v. 22-23]
this person’s r religion is worthless.
[if this is you] Then your religion is worthless [you won't find any blessing in or though what you are doing, because it isn't action founded on the perfect law (v.25)]
Religion that is pure and undefiled before God, the Father, is this:
However, true and pure religion, the kind that is pleasing before God, the Father, is:
s to visit t orphans
 to visit orphans in their affliction
and widows in their affliction,
 to visit widows in their affliction
and u to keep oneself v unstained from the world.
and  to keep yourself unstained by the world around you [This is done through being doers of the perfect implanted word, which is able to save your very souls! (v.21,25)].