Tips on Customizing WP Terms Popup

How to Hide WP Terms Popup Admin Menus

function plt_hide_wp_terms_popup_menus() {
	//Hide "WP Terms Popup".
	remove_menu_page('edit.php?post_type=termpopup');
	//Hide "WP Terms Popup → All Popups".
	remove_submenu_page('edit.php?post_type=termpopup', 'edit.php?post_type=termpopup');
	//Hide "WP Terms Popup → Add New".
	remove_submenu_page('edit.php?post_type=termpopup', 'post-new.php?post_type=termpopup');
	//Hide "WP Terms Popup → Settings".
	remove_submenu_page('edit.php?post_type=termpopup', 'terms-popup-plugin-settings');
	//Hide "WP Terms Popup → Designer".
	remove_submenu_page('edit.php?post_type=termpopup', 'terms-popup-plugin-designer');
	//Hide "WP Terms Popup → Collector".
	remove_submenu_page('edit.php?post_type=termpopup', 'terms-popup-plugin-collector');
}

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

Where do I put this code?

How to Hide WP Terms Popup Meta Boxes

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

	//Hide the "WP Terms Popup" meta box.
	remove_meta_box('termpopup-setting', $screen->id, 'side');
	//Hide the "WP Terms Popup Settings" meta box.
	remove_meta_box('thepopup-meta', $screen->id, 'normal');
}

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