How to Hide ShortPixel Image Optimizer Admin Menus

function plt_hide_shortpixel_image_optimiser_menus() {
	//Hide the "Settings → ShortPixel" menu.
	remove_submenu_page('options-general.php', 'wp-shortpixel-settings');

	//Hide the "Media → Custom Media" menu.
	remove_submenu_page('upload.php', 'wp-short-pixel-custom');
	//Hide the "Media → Bulk ShortPixel" menu.
	remove_submenu_page('upload.php', 'wp-short-pixel-bulk');
}

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

Where do I put this code?