Remove CMS Reports from Silverstripe

I use Silverstripe a lot for quickly creating client friendly projects. Silverstripe has a Reports module that allows you to easily compile and display data to admin/CMS users.

The CMS module that controls pages created on the site provides a number of reports for things like broken links. I did not need these reports on a recent project so looked for ways to remove them.

I found a static method in SS_Reports.php that allows just this functionality:

SS_Report::add_excluded_reports(array());

add_excluded_reports supports either an array of report classnames or a single string entry as input.

To remove all of the CMS reports you can add this to your _config.php file:

SS_Report::add_excluded_reports([
'BrokenFilesReport',
'BrokenLinksReport',
'BrokenRedirectorPagesReport',
'BrokenVirtualPagesReport',
'RecentlyEditedReport',
'EmptyPagesReport'
]);