Tips on Customizing Featured Image from URL

How to Hide the "Featured Image from URL" Admin Menu

function plt_hide_featured_image_from_url_menus() {
	//Hide the "Featured Image from URL" menu.
	remove_menu_page('featured-image-from-url');
}

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

Where do I put this code?

How to Hide the "Featured Image from URL" Meta Box

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

	//Hide the "Featured Image from URL" meta box.
	remove_meta_box('imageUrlMetaBox', $screen->id, 'side');
}

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