Hi, thanks for this. I was just about to write my own....
We are still using CiviCRM 5.13.5. Your extension doesn't appear in the Add New tab, so I uploaded it directly and unpacked it. It installed in CiviCRM without error or complaint. However it does not appear in the list of Custom Searches.
I attempted to add it myself, guessing what the class path would be (CRM_ContributionSearch_BAO_Query) but it didn't work. Trying to run it gives me a white page.