Tips on Customizing CMS Tree Page View

How to Hide CMS Tree Page View Admin Menus

function plt_hide_cms_tree_page_view_menus() {
	//Hide the "Pages → Tree View" menu.
	remove_submenu_page('edit.php?post_type=page', 'cms-tpv-page-page');
	//Hide the "Settings → CMS Tree Page View" menu.
	remove_submenu_page('options-general.php', 'cms-tpv-options');
}

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

Where do I put this code?

How to Hide the "Pages Tree" Dashboard Widget

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

	//Remove the "Pages Tree" widget.
	remove_meta_box('cms_tpv_dashboard_widget_page', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'plt_hide_cms_tree_page_view_dashboard_widgets', 20);