Need a console application. This console app should execute on the SharePoint server 2007.
1. To get the list of webparts on each page in each document / page library in the site. along with their site collection and subsites.
2. Check each webpart assembly name and class name (this could be an inclusive check by comparing it with a list of the 30 custom web part list or excluding the ootb web parts.)
3. Log the page url and names