Tips on Customizing Akismet Anti-Spam

How to Hide the "Akismet Anti-Spam" Admin Menu

function plt_hide_akismet_menus() {
	//Hide the "Settings → Akismet Anti-Spam" menu.
	remove_submenu_page('options-general.php', 'akismet-key-config');
}

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

Where do I put this code?

How to Hide the "Comment History" Meta Box

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

	//Hide the "Comment History" meta box.
	remove_meta_box('akismet-status', $screen->id, 'normal');
}

add_action('add_meta_boxes', 'plt_hide_akismet_metaboxes', 20);