Tips on Customizing WordPress Download Manager

How to Hide Download Manager Admin Menus

function plt_hide_download_manager_menus() {
	//Hide "Downloads".
	remove_menu_page('edit.php?post_type=wpdmpro');
	//Hide "Downloads → All Files".
	remove_submenu_page('edit.php?post_type=wpdmpro', 'edit.php?post_type=wpdmpro');
	//Hide "Downloads → Add New".
	remove_submenu_page('edit.php?post_type=wpdmpro', 'post-new.php?post_type=wpdmpro');
	//Hide "Downloads → Tags".
	remove_submenu_page('edit.php?post_type=wpdmpro', 'edit-tags.php?taxonomy=post_tag&post_type=wpdmpro');
	//Hide "Downloads → Categories".
	remove_submenu_page('edit.php?post_type=wpdmpro', 'edit-tags.php?taxonomy=wpdmcategory&post_type=wpdmpro');
	//Hide "Downloads → Templates".
	remove_submenu_page('edit.php?post_type=wpdmpro', 'templates');
	//Hide "Downloads → Add-Ons".
	remove_submenu_page('edit.php?post_type=wpdmpro', 'wpdm-addons');
	//Hide "Downloads → History".
	remove_submenu_page('edit.php?post_type=wpdmpro', 'wpdm-stats');
	//Hide "Downloads → Settings".
	remove_submenu_page('edit.php?post_type=wpdmpro', 'settings');
}

add_action('admin_menu', 'plt_hide_download_manager_menus', 11);

Where do I put this code?

How to Hide Download Manager Meta Boxes

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

	//Hide the "Package Settings" meta box.
	remove_meta_box('wpdm-settings', $screen->id, 'normal');
	//Hide the "Attach File" meta box.
	remove_meta_box('wpdm-upload-file', $screen->id, 'side');
}

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

How to Hide the "WordPress Download Manager" Dashboard Widget

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

	//Remove the "WordPress Download Manager" widget.
	remove_meta_box('wpdm_dashboard_widget', 'dashboard', 'side');
}

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