Law reference?
While the game is ongoing - fair enough. But if we started pulling cards for things that happened before or after a game (but still on the playing enclosure) wouldn't that make us look a laughing stock? If it's aimed at us, then why isn't it just a Code of Conduct matter? As has been mentioned, let the Disciplinary Committee sort it out.
I don't think it makes the ref look a laughing stock - precisely the opposite. It shows that he is in charge and makes a clear statement that abuse will not be tolerated. If he simply fills in a CoC form, that's not seen by the assembled crowd.
And, in a related matter, I've been told previously that I can red card a coach after the match (one of my early matches, and mistakes, where I went to shake hands with a coach and he refused, saying that he wouldn't shake hands with a f***ing cheat; I didn't know what to do and accepted the sincere apology of his co-coach). Is this the view (that you can red card a coach)?