Tips on Customizing WP Activity Log

How to Hide WP Activity Log Admin Menus

function plt_hide_wp_security_audit_log_menus() {
	//Hide "Dashboard →".
	remove_submenu_page('index.php', 'wsal-setup');

	//Hide "WP Activity Log".
	remove_menu_page('wsal-auditlog');
	//Hide "WP Activity Log → Log viewer".
	remove_submenu_page('wsal-auditlog', 'wsal-auditlog');
	//Hide "WP Activity Log → Email  SMS Notifications ✛".
	remove_submenu_page('wsal-auditlog', 'wsal-emailnotifications');
	//Hide "WP Activity Log → Search Filters ✛".
	remove_submenu_page('wsal-auditlog', 'wsal-search');
	//Hide "WP Activity Log → Reports ✛".
	remove_submenu_page('wsal-auditlog', 'wsal-reports');
	//Hide "WP Activity Log → Logged In Users ✛".
	remove_submenu_page('wsal-auditlog', 'wsal-loginusers');
	//Hide "WP Activity Log → Integrations ✛".
	remove_submenu_page('wsal-auditlog', 'wsal-externaldb');
	//Hide "WP Activity Log → Settings".
	remove_submenu_page('wsal-auditlog', 'wsal-settings');
	//Hide "WP Activity Log → Enable/Disable Events".
	remove_submenu_page('wsal-auditlog', 'wsal-togglealerts');
	//Hide "WP Activity Log → Help  Contact Us".
	remove_submenu_page('wsal-auditlog', 'wsal-help');
	//Hide "WP Activity Log → Upgrade to Premium".
	remove_submenu_page('wsal-auditlog', 'upgrade');
}

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

Where do I put this code?

How to Hide the "Latest Events | WP Activity Log" Dashboard Widget

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

	//Remove the "Latest Events | WP Activity Log" widget.
	remove_meta_box('wsal', 'dashboard', 'normal');
}

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