Add-ons do different things in different ways, and the method for establishing if one type of add-on is used is wildly different for another, hence there's no way to actually code anything for this.
For example, to find out if the JIRA Suite Utilities is used (and this is just one function of that add-on, not all of them), you need to search the workflows for use of the classes it provides. Easiest way is an xml export and a text search. But an addon that provides a field - run a search for <field is not empty>. Or a reporting add-on - you'd really need to search the access logs to see if anyone is hitting the reporting urls.
There are some things you can do, but there's no way to do a comprehensive search. At some point, you need to make the call and go for "turn it off and see who screams" because it's less effort than the detailed searching you need to do.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG