How to Hide the "SG Optimizer" Admin Menu

function plt_hide_sg_cachepress_menus() {
	//Hide the "SG Optimizer" menu.
	remove_menu_page('sg-cachepress');
}

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

Where do I put this code?