After a plugin is deinstalled from a WordPress website it will either remove all its data from the database or leave it in case the plugin is installed again.
Upon deactivation, if the plugin’s data isn’t removed from the database you should manually remove it in order to optimize the database and get rid of these unused loads.
All In One WP Security plugin leaves all data in the database and for big websites, We are talking about GB of data.
This plugin uses the following tables to store data:
To check which tables each plugin uses make sure to read their Documentation.
After uninstalling a plugin you should check manually the database for leftover data. From PHPMyAdmin select your WP database and click on the Search tab, then type in the plugin name (slug) and Go to search the database.
NOTE: Make sure to backup the database before doing any modifications.
To delete this data click on the “Delete” link next to the results.