Tips on Customizing All in One SEO Pack

How to Hide All In One SEO Pack Admin Menus

function plt_hide_all_in_one_seo_pack_menus() {
	//Hide "Tools → SEO Data Import".
	remove_submenu_page('tools.php', 'aiosp_import');

	//Hide "All in One SEO".
	remove_menu_page('all-in-one-seo-pack/aioseop_class.php');
	//Hide "All in One SEO → General Settings".
	remove_submenu_page('all-in-one-seo-pack/aioseop_class.php', 'all-in-one-seo-pack/aioseop_class.php');
	//Hide "All in One SEO → Performance".
	remove_submenu_page('all-in-one-seo-pack/aioseop_class.php', 'all-in-one-seo-pack/modules/aioseop_performance.php');
	//Hide "All in One SEO → Feature Manager".
	remove_submenu_page('all-in-one-seo-pack/aioseop_class.php', 'all-in-one-seo-pack/modules/aioseop_feature_manager.php');
	//Hide "All in One SEO → Upgrade to Pro".
	remove_submenu_page('all-in-one-seo-pack/aioseop_class.php', 'https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_menu');
}

add_action('admin_menu', 'plt_hide_all_in_one_seo_pack_menus', 1000);

Where do I put this code?

How to Hide All In One SEO Pack Meta Boxes

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

	//Hide the "Join Our Mailing List" meta box.
	remove_meta_box('aioseop-list', $screen->id, 'normal');
	//Hide the "AboutVersion 3.2.7" meta box.
	remove_meta_box('aioseop-about', $screen->id, 'side');
	//Hide the "Support Version 3.2.7" meta box.
	remove_meta_box('aioseop-support', $screen->id, 'side');
	//Hide the "All in One SEO PackHelp" meta box.
	remove_meta_box('aiosp', $screen->id, 'normal');
}

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

How to Hide the "SEO News" Dashboard Widget

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

	//Remove the "SEO News" widget.
	remove_meta_box('semperplugins-rss-feed', 'dashboard', 'normal');
}

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