Tips on Customizing Download Monitor

How to Hide Download Monitor Admin Menus

function plt_hide_download_monitor_menus() {
	//Hide "Downloads".
	remove_menu_page('edit.php?post_type=dlm_download');
	//Hide "Downloads → All Downloads".
	remove_submenu_page('edit.php?post_type=dlm_download', 'edit.php?post_type=dlm_download');
	//Hide "Downloads → Add Download".
	remove_submenu_page('edit.php?post_type=dlm_download', 'post-new.php?post_type=dlm_download');
	//Hide "Downloads → Categories".
	remove_submenu_page('edit.php?post_type=dlm_download', 'edit-tags.php?taxonomy=dlm_download_category&post_type=dlm_download');
	//Hide "Downloads → Tags".
	remove_submenu_page('edit.php?post_type=dlm_download', 'edit-tags.php?taxonomy=dlm_download_tag&post_type=dlm_download');
	//Hide "Downloads → Global Rules".
	remove_submenu_page('edit.php?post_type=dlm_download', 'dlm_aam_upsell_modal');
	//Hide "Downloads → Buttons".
	remove_submenu_page('edit.php?post_type=dlm_download', 'dlm_buttons_upsell_modal');
	//Hide "Downloads → Settings".
	remove_submenu_page('edit.php?post_type=dlm_download', 'download-monitor-settings');
	//Hide "Downloads → Reports".
	remove_submenu_page('edit.php?post_type=dlm_download', 'download-monitor-reports');
	//Hide "Downloads → Extensions".
	remove_submenu_page('edit.php?post_type=dlm_download', 'dlm-extensions');
	//Hide "Downloads → LITE vs Premium".
	remove_submenu_page('edit.php?post_type=dlm_download', '#dlm-lite-vs-pro');
}

add_action('admin_menu', 'plt_hide_download_monitor_menus', 21);

Where do I put this code?

How to Hide the "Debug download" Meta Box

function plt_hide_download_monitor_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Hide the "Debug download" meta box.
	remove_meta_box('dlm-debug', $screen->id, 'side');
}

add_action('add_meta_boxes', 'plt_hide_download_monitor_metaboxes', 20);

How to Hide the "Top Downloads" Dashboard Widget

function plt_hide_download_monitor_dashboard_widgets() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Remove the "Top Downloads" widget.
	remove_meta_box('dlm_popular_downloads', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'plt_hide_download_monitor_dashboard_widgets', 20);