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 → Enable/Disable Events".
	remove_submenu_page('wsal-auditlog', 'wsal-togglealerts');
	//Hide "WP Activity Log → Logged In Users".
	remove_submenu_page('wsal-auditlog', 'wsal-loginusers');
	//Hide "WP Activity Log → Notifications".
	remove_submenu_page('wsal-auditlog', 'wsal-emailnotifications');
	//Hide "WP Activity Log → Reports".
	remove_submenu_page('wsal-auditlog', 'wsal-reports');
	//Hide "WP Activity Log → DB & Integrations".
	remove_submenu_page('wsal-auditlog', 'wsal-externaldb');
	//Hide "WP Activity Log → Search".
	remove_submenu_page('wsal-auditlog', 'wsal-search');
	//Hide "WP Activity Log → Settings".
	remove_submenu_page('wsal-auditlog', 'wsal-settings');
	//Hide "WP Activity Log → Help".
	remove_submenu_page('wsal-auditlog', 'wsal-help');
	//Hide "WP Activity Log → Contact Us".
	remove_submenu_page('wsal-auditlog', 'wsal-auditlog-contact');
	//Hide "WP Activity Log → Upgrade".
	remove_submenu_page('wsal-auditlog', 'wsal-auditlog-pricing');
}

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

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);