How to Hide Performance Lab Admin Menus

function plt_hide_performance_lab_menus() {
	//Hide the "Tools → Server-Timing" menu.
	remove_submenu_page('tools.php', 'perflab-server-timing');
	//Hide the "Settings → Performance" menu.
	remove_submenu_page('options-general.php', 'performance-lab');
}

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

Where do I put this code?