Tips on Customizing Lightbox with PhotoSwipe

How to Hide the "Lightbox with PhotoSwipe" Admin Menu

function plt_hide_lightbox_photoswipe_menus() {
	//Hide the "Settings → Lightbox with PhotoSwipe" menu.
	remove_submenu_page('options-general.php', 'lightbox-photoswipe');

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

Where do I put this code?

How to Hide the "Lightbox with PhotoSwipe" Meta Box

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

	//Hide the "Lightbox with PhotoSwipe" meta box.
	remove_meta_box('lightbox-photoswipe', $screen->id, 'side');

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