How to Hide Disable Thumbnails, Threshold and Image Options Admin Menus

function plt_hide_disable_thumbnails_and_threshold_menus() {
	//Hide the "Tools → Image Sizes" menu.
	remove_submenu_page('tools.php', 'kgmdisablethumbnails');
	//Hide the "Tools → Image Quality" menu.
	remove_submenu_page('tools.php', 'kgmimgquality');
	//Hide the "Tools → Image ThresholdEXIF" menu.
	remove_submenu_page('tools.php', 'kgmdisablethreshold');
}

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

Where do I put this code?