How to Hide Blog Filter Admin Menus

function plt_hide_blog_filter_menus() {
	//Hide the "Posts → Blog Filters Settings" menu.
	remove_submenu_page('edit.php', 'blog-filter-settings-page');
	//Hide the "Appearance → Install Plugins" menu.
	remove_submenu_page('themes.php', 'tgmpa-install-plugins');
}

add_action('admin_menu', 'plt_hide_blog_filter_menus', 102);

Where do I put this code?