Tips on Customizing WP Mail Logging

How to Hide WP Mail Logging Admin Menus

function plt_hide_wp_mail_logging_menus() {
	//Hide the "Tools → WP Mail Log" menu.
	remove_submenu_page('tools.php', 'wpml_plugin_log');
	//Hide the "Settings → Redux" menu.
	remove_submenu_page('options-general.php', 'redux-framework');

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

Where do I put this code?

How to Hide the "Post Attributes" Meta Box

function plt_hide_wp_mail_logging_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {

	//Hide the "Post Attributes" meta box.
	remove_meta_box('pageparentdiv', $screen->id, 'side');

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