How to Hide Converter for Media Admin Menus

function plt_hide_webp_converter_for_media_menus() {
	//Hide the "Media → Converter for Media" menu.
	remove_submenu_page('upload.php', 'webpc_optimization_page');
	//Hide the "Settings → Converter for Media" menu.
	remove_submenu_page('options-general.php', 'webpc_admin_page');
}

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

Where do I put this code?