WordPress makes it easy to bring your site online and grow it faster. You will still have to take time to optimize your database and cleanup your media folders from time to time. Fix Media Library for WordPress can help. It fixes inconsistencies between your database and uploads folder. It can handle new and unused thumbnails, fix duplicate attachments, and detect database corruption.
The plugin goes through your database and upload folders to find unreferenced files, errors, and everything in between. You can choose to analyze duplicate/broken attachments, unreferenced thumbnails, images with weak references, and enable logging. The plugin can simply log errors or delete problematic files.