How to Hide Photo Gallery Admin Menus

function plt_hide_photo_gallery_menus() {
	//Hide "Photo Gallery".
	remove_menu_page('galleries_bwg');
	//Hide "Photo Gallery → Add Galleries/Images".
	remove_submenu_page('galleries_bwg', 'galleries_bwg');
	//Hide "Photo Gallery → Gallery Groups".
	remove_submenu_page('galleries_bwg', 'albums_bwg');
	//Hide "Photo Gallery → Tags".
	remove_submenu_page('galleries_bwg', 'edit-tags.php?taxonomy=bwg_tag');
	//Hide "Photo Gallery → Global Settings".
	remove_submenu_page('galleries_bwg', 'options_bwg');
	//Hide "Photo Gallery → Themes".
	remove_submenu_page('galleries_bwg', 'themes_bwg');
	//Hide "Photo Gallery → Add-ons".
	remove_submenu_page('galleries_bwg', 'addons_bwg');
	//Hide "Photo Gallery → Ask a question".
	remove_submenu_page('galleries_bwg', 'https://wordpress.org/support/plugin/photo-gallery/#new-post');
}

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

Where do I put this code?