>I don't know if it is or not

I am not Chinese but have several friends in China.

It depends on the context and the criticism - if the criticism is generally correct or popular and is something the CCP could feasibly fix, it's fine even if harsh, and firing you is probably a lot more trouble than it's worth. Targeting an individual Party official who is high ranking enough could get you a corrupt reprisal from them, but that is obviously rare, and over time as corruption has gone down the Party official has to be higher and higher up to be able to pull it off.

If the criticism is something like "The Chinese government is committing genocide", that would definitely be illegal as subversion of the state, and "We need democracy in China, the CCP is a dictatorship" would get you done for subversion of the socialist system (their terminology, not mine). In general, if you're saying things like that you might lose your job (particularly if Chinese netizens see it and mob up to demand you be fired, put in prison, thrown into the sun, etc). A more common consequence is that the authorities will look into your life and find some law you're breaking, often tax evasion - it is rare they actually charge dissidents with the whole subversion of the state and the socialist system schtick, they prefer to reserve that for more serious cases if they can. Even if they do charge dissidents for it, what the prosecution generally wants is not maximum sentence, death penalty etc - what they want most is for you to write an apology letter/video and renounce your statements calling for overthrow of the CCP or whatever. In practice that can lead to funny outcomes with dedicated dissidents, where the prosecution is trying to argue they're just a kid and this isn't that bad and time served + monitoring will be fine with an apology, and the dissident is insisting that they're a very capable revolutionary dedicated to the defeat of their local government or the CCP as a whole or whatever - sort of a special case inversion of the West, where we generally have prosecutors pushing for heavier sentences and defendants understandably trying to minimise them.

What is actually dangerous and will get the book thrown at you is any attempt to get (or even enough appearance of having) foreign support. China takes the threat of Western IC associated "subversive activity" extremely seriously, they do not mess around with anything like that. It's why a lot of Chinese political groups that actually stick around and get accommodations (e.g. some queer rights groups) take great pains to separate themselves from Western organisations and causes, even if it's the same cause in a different country. In China it is a massive political handicap (and a target on your back) to have foreign support for your criticisms of the government. To make an analogy that might help understand the frame of mind, imagine a politician running for election somewhere in the US who was regularly talking about how much better China does this or that and how we should be more like them, is in communication with in-country Chinese groups or people, and was anti-US to some significant degree. Voters/the public would not like them very much, and the US government would probably pay very close attention to them and what they were doing.