A Supreme Court judge in the USA said "Freedom of speech does not include the right to shout 'Fire' in a crowded theatre." Even in the USA, "freedom of speech" is not absolute. The boundary between what is permissible and what is not is very fine.
I think that - on this forum - we are generally agreed that, on matters of religion and religious belief, no-one has the right not to be offended. However, anyone who tries that out in Pakistan ......
Directly attacking people rather than just their beliefs is - in my opinion - not acceptable. "If you believe that then you are stupid" is different from "that is a stupid belief." On this forum we frequently point out flaws in thinking and also suggest that an individual - in accepting a particular belief - is credulous. Such statements are usually readily supportable.
As far as insulting remarks about ethnic origin, sex or sexual orientation is concerned, the law in England and Wales is clear.