How to verify if blog post don’t have any categories in WordPress

In my current work I have to solve many problems for customers with WordPress websites. It’s common to see this scenario: Website running a child theme based on Twenty something WP Theme A thousand plugins installed, half active, half inactive Patches all over functions.php Custom plugins A mess in the way they created .php files …