Tips on Customizing WP fail2ban – Advanced Security

How to Hide WP fail2ban Admin Menus

function plt_hide_wp_fail2ban_menus() {
	//Hide "WP fail2ban".
	remove_menu_page('wp-fail2ban-menu');
	//Hide "WP fail2ban → Welcome".
	remove_submenu_page('wp-fail2ban-menu', 'wp-fail2ban-menu');
	//Hide "WP fail2ban → Settings".
	remove_submenu_page('wp-fail2ban-menu', 'wpf2b-settings');
	//Hide "WP fail2ban → Contact Us".
	remove_submenu_page('wp-fail2ban-menu', 'wp-fail2ban-menu-contact');
	//Hide "WP fail2ban → Support Forum".
	remove_submenu_page('wp-fail2ban-menu', 'wp-fail2ban-menu-wp-support-forum');
	//Hide "WP fail2ban → Add-Ons".
	remove_submenu_page('wp-fail2ban-menu', 'wp-fail2ban-menu-addons');
	//Hide "WP fail2ban → Upgrade".
	remove_submenu_page('wp-fail2ban-menu', 'wp-fail2ban-menu-pricing');
}

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

Where do I put this code?

How to Hide the "[WPf2b] Last 5 Messages" Dashboard Widget

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

	//Remove the "[WPf2b] Last 5 Messages" widget.
	remove_meta_box('wp_fail2ban_last_messages', 'dashboard', 'normal');
}

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