I think there's a world of a difference between "you wrote some code and it sucks" to "you wrote some code and it sucks because you have beginner energy and live in a fever dream". The former can be an objective statement without attribution to personal failings, while the latter... not really. If I put the latter as a PR comment to my intern in the morning I would expect a meeting invite from HR by the afternoon at the latest