Tips on Customizing Admin Menu Editor

How to Hide the "Menu Editor" Admin Menu

function plt_hide_admin_menu_editor_menus() {
	//Hide the "Settings → Menu Editor" menu.
	remove_submenu_page('options-general.php', 'menu_editor');
}

add_action('admin_menu', 'plt_hide_admin_menu_editor_menus', 2147483647);

Where do I put this code?

How to Hide the "[AME placeholder]" Meta Box

function plt_hide_admin_menu_editor_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Hide the "[AME placeholder]" meta box.
	remove_meta_box('ws-ame-screen-options', $screen->id, 'advanced');
}

add_action('add_meta_boxes', 'plt_hide_admin_menu_editor_metaboxes', 20);