Tips on Customizing Async JavaScript

How to Hide the "Async JavaScript" Admin Menu

function plt_hide_async_javascript_menus() {
	//Hide the "Settings → Async JavaScript" menu.
	remove_submenu_page('options-general.php', 'async-javascript');
}

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

Where do I put this code?

How to Hide the "Async JavaScript" Dashboard Widget

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

	//Remove the "Async JavaScript" widget.
	remove_meta_box('aj_dashboard_widget', 'dashboard', 'normal');
}

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