Tips on Customizing Visual Composer Website Builder

How to Hide Visual Composer Admin Menus

function plt_hide_visualcomposer_menus() {
	//Hide "Posts → Add New with VisualComposer".
	remove_submenu_page('edit.php', 'post-new.php?vcv-action=frontend');
	//Hide "Pages → Add New with VisualComposer".
	remove_submenu_page('edit.php?post_type=page', 'post-new.php?post_type=page&vcv-action=frontend');

	//Hide "Visual Composer".
	remove_menu_page('vcv-settings');
	//Hide "Visual Composer → Dashboard".
	remove_submenu_page('vcv-settings', 'vcv-settings');
	//Hide "Visual Composer → CSS, HTML & JavaScript".
	remove_submenu_page('vcv-settings', 'vcv-global-css-js');
	//Hide "Visual Composer → Visual Composer Hub".
	remove_submenu_page('vcv-settings', 'vcv-hub');
	//Hide "Visual Composer → System Status".
	remove_submenu_page('vcv-settings', 'vcv-system-status');
	//Hide "Visual Composer → Getting Started".
	remove_submenu_page('vcv-settings', 'vcv-getting-started');
	//Hide "Visual Composer →  Activate Hub".
	remove_submenu_page('vcv-settings', 'vcv-go-premium');
}

add_action('admin_menu', 'plt_hide_visualcomposer_menus', 71);

Where do I put this code?

How to Hide the "Visual Composer News" Dashboard Widget

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

	//Remove the "Visual Composer News" widget.
	remove_meta_box('visualcomposer-blog-dashboard', 'dashboard', 'normal');
}

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