How to Hide ShortPixel Image Optimizer Admin Menus

function plt_hide_shortpixel_image_optimiser_menus() {
	//Hide the "Media → Bulk ShortPixel" menu.
	remove_submenu_page('upload.php', 'wp-short-pixel-bulk');
	//Hide the "Settings → ShortPixel" menu.
	remove_submenu_page('options-general.php', 'wp-shortpixel-settings');
}

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

Where do I put this code?