diff --git wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
index 227e4645..2aa8b6ec 100644
--- wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
+++ wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
@@ -679,6 +679,76 @@ class Template {
 	}
 
 	/**
+	 * Checks whether a plugin is closed or not.
+	 *
+	 * @return bool
+	 */
+	public static function plugin_is_closed() {
+		$status = get_post_status();
+		if ( in_array( $status, array( 'closed', 'disabled' ) ) ) {
+			return true;
+		}
+
+		return false;
+	}
+
+	/**
+	 * Returns text to show to plugin authors on closed pages
+	 */
+	public static function plugin_closed_author_info() {
+		return sprintf(
+		/* translators: 1: plugins@wordpress.org */
+			__( 'If you did not request this change, please contact <a href="mailto:%1$s">%1$s</a> for a status. All developers with commit access are contacted when a plugin is closed, with the reasons why, so check your spam email too.', 'wporg-plugins' ),
+			'plugins@wordpress.org'
+		);
+	}
+
+	/**
+	 * Returns a string about why the plugin isn't active.
+	 *
+	 * @return array {
+	 *      @type string $message The reason the plugin isn't active
+	 *      @type string $notice_type The notice type.
+	 * }
+	 */
+	public static function plugin_not_active_reason() {
+		$status      = get_post_status();
+		$notice_type = 'notice-error';
+		switch ( $status ) {
+			case 'draft':
+			case 'pending':
+				$message     = __( 'This plugin is requested and not visible to the public yet. Please be patient as your plugin gets reviewed.', 'wporg-plugins' );
+				$notice_type = 'notice-info';
+				break;
+
+			case 'approved':
+				$message     = __( 'This plugin is approved and awaiting data upload but not visible to the public yet. Once you make your first commit, the plugin will become public.', 'wporg-plugins' );
+				$notice_type = 'notice-info';
+				break;
+
+			case 'rejected':
+				$message = __( 'This plugin has been rejected and is not visible to the public.', 'wporg-plugins' );
+				break;
+
+			case 'disabled':
+				if ( current_user_can( 'plugin_approve' ) ) {
+					$message = __( 'This plugin is disabled (closed, but actively serving updates).', 'wporg-plugins' );
+					break;
+				} else {
+					$message = __( 'This plugin has been closed for new installs.', 'wporg-plugins' );
+					break;
+				}
+			// fall through
+			default:
+			case 'closed':
+				$message = __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' );
+				break;
+		}
+
+		return compact( $message, $notice_type );
+	}
+
+	/**
 	 * Returns the close/disable reason for a plugin.
 	 *
 	 * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
index 708ba636..bb57cb62 100644
--- wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
+++ wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
@@ -14,83 +14,51 @@ use WordPressdotorg\Plugin_Directory\Tools;
 global $section, $section_slug, $section_content, $section_read_more;
 
 $content = Plugin_Directory::instance()->split_post_content_into_pages( get_the_content() );
-$status  = get_post_status();
-
-?><article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-    <?php
-    // Don't show the plugin banner for closed plugins
-    if ( ! in_array( $status, array( 'closed', 'disabled' ) ) ) {
-	    echo Template::get_plugin_banner( get_post(), 'html' );
-    }
-    ?>
-
-	<header class="plugin-header">
-		<?php if ( time() - get_post_modified_time() > 2 * YEAR_IN_SECONDS ) : ?>
-			<div class="plugin-notice notice notice-warning notice-alt">
-				<p><?php _e( 'This plugin <strong>hasn&#146;t been updated in over 2 years</strong>. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.', 'wporg-plugins' ); ?></p>
-			</div>
-		<?php endif; ?>
-		<?php if ( 'publish' !== $status ) :
-				$notice_type = 'notice-error';
-				switch ( $status ) {
-					case 'draft':
-					case 'pending':
-						$message = __( 'This plugin is requested and not visible to the public yet. Please be patient as your plugin gets reviewed.', 'wporg-plugins' );
-						$notice_type = 'notice-info';
-						break;
-
-					case 'approved':
-						$message = __( 'This plugin is approved and awaiting data upload but not visible to the public yet. Once you make your first commit, the plugin will become public.', 'wporg-plugins' );
-						$notice_type = 'notice-info';
-						break;
-
-					case 'rejected':
-						$message = __( 'This plugin has been rejected and is not visible to the public.', 'wporg-plugins' );
-						break;
-
-					case 'disabled':
-						if ( current_user_can( 'plugin_approve' ) ) {
-							$message = __( 'This plugin is disabled (closed, but actively serving updates).', 'wporg-plugins' );
-							break;
-						} else {
-							$message = __( 'This plugin has been closed for new installs.', 'wporg-plugins' );
-							break;
-						}
-						// fall through
-					default:
-					case 'closed':
-						$message = __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' );
-						break;
-				}
+?>
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+	<?php
+	// Don't show the plugin banner for closed plugins
+	if ( ! Template::plugin_is_closed() ) {
+		echo Template::get_plugin_banner( get_post(), 'html' );
+	}
+	?>
+
+    <header class="plugin-header">
+		<?php
 
-            if ( in_array( $status, array( 'closed', 'disabled' ) ) ) {
-	            $closed_date    = get_post_meta( get_the_ID(), 'plugin_closed_date', true );
-	            if ( ! empty( $closed_date ) ) {
-		            $message .= '<br/>';
-					$message .= sprintf( __( 'This plugin was closed on %s.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) );
+		$status = get_post_status();
+		if ( 'publish' !== $status ) :
+			$message = Template::plugin_not_active_reason();
+			if ( Template::plugin_is_closed() ) {
+				$closed_date = get_post_meta( get_the_ID(), 'plugin_closed_date', true );
+				if ( ! empty( $closed_date ) ) {
+					$message['message'] .= '<br/>';
+					$message['message'] .= sprintf( __( 'This plugin was closed on %s.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) );
 				}
-            }
-
-		if ( ! in_array( $status, array( 'closed', 'disabled' ) ) ) {
-				    // the notice for closed and disabled is shown below the Description header, because we don't output the readme there
-			?>
-            <!-- .plugin-notice -->
-			<div class="plugin-notice notice <?php echo esc_attr( $notice_type ); ?> notice-alt">
-				<p><?php echo $message; ?></p>
-			</div>
-            <!-- .plugin-notice -->
-        <?php } ?>
-		<?php endif; ?>
-
-		<div class="entry-thumbnail">
-			<?php echo Template::get_plugin_icon( get_post(), 'html' ); ?>
-		</div>
+			} else {
+				// the notice for closed and disabled is shown below the Description header, because we don't output the readme there
+				?>
+                <!-- .plugin-notice -->
+                <div class="plugin-notice notice <?php echo esc_attr( $message['notice_type'] ); ?> notice-alt">
+                    <p><?php echo $message['message']; ?></p>
+                </div>
+                <!-- .plugin-notice -->
+				<?php
+			}
+
+		endif;
+
+		// Don't show the icon (and its wrapping div) for closed plugins
+		if ( ! Template::plugin_is_closed() ) {
+			printf( '<div class="entry-thumbnail">%s</div>', Template::get_plugin_icon( get_post(), 'html' ) );
+		}
+		?>
 
-		<div class="plugin-actions">
+        <div class="plugin-actions">
 			<?php
 			if ( is_user_logged_in() ) :
 				$url = Template::get_favorite_link();
-				$is_favorited = Tools::favorited_plugin( $post );
+				$is_favorited = Tools::favorited_plugin( get_post() );
 				?>
 				<div class="plugin-favorite">
 					<a href="<?php echo esc_url( $url ); ?>" class="plugin-favorite-heart<?php echo $is_favorited ? ' favorited' : ''; ?>">
@@ -124,8 +92,8 @@ $status  = get_post_status();
 		</div>
 	
 		<?php 
-		if ( in_array( $status, array( 'closed', 'disabled' ) ) ) {
-			$plugin_title = $post->post_name;
+		if ( Template::plugin_is_closed() ) {
+			$plugin_title = get_post()->post_name;
 		} else {
 			$plugin_title = get_the_title();
 		}
@@ -155,7 +123,7 @@ $status  = get_post_status();
 	<ul class="tabs clear">
 		<li id="tablink-description"><a href='#description'><?php _e( 'Details', 'wporg-plugins' ); ?></a></li>
 		<li id="tablink-reviews"><a href='#reviews'><?php _e( 'Reviews', 'wporg-plugins' ); ?></a></li>
-<?php if ( isset( $content[ 'installation' ] ) && ! in_array( $status, array( 'closed', 'disabled' ) ) ) { ?>
+<?php if ( isset( $content[ 'installation' ] ) && ! Template::plugin_is_closed() ) { ?>
 		<li id="tablink-installation"><a href='#installation'><?php _e( 'Installation', 'wporg-plugins' ); ?></a></li>
 <?php } ?>
 		<li id="tablink-support"><a href='<?php echo Template::get_support_url(); ?>'><?php _e( 'Support', 'wporg-plugins' ); ?></a></li>
@@ -174,19 +142,15 @@ $status  = get_post_status();
 					continue;
 				}
 
-				if ( 'description' === $section_slug && in_array( $status, array( 'closed', 'disabled' ) ) ) {
-			        // Don't show the description for closed plugins
-					$section_content = '<div class="plugin-notice notice notice-error notice-alt"><p>' . $message . '</p></div>';
-		            if ( get_current_user_id() == get_post()->post_author ) {
-			            $section_content .= '<div class="plugin-notice notice notice-info notice-alt"><p>' .
-			                                sprintf(
-			                                /* translators: 1: plugins@wordpress.org */
-				                                __( 'If you did not request this change, please contact <a href="mailto:%1$s">%1$s</a> for a status. All developers with commit access are contacted when a plugin is closed, with the reasons why, so check your spam email too.', 'wporg-plugins' ),
-				                                'plugins@wordpress.org'
-			                                ) . '</p></div><!-- .plugin-notice -->';
-		            }
+				if ( 'description' === $section_slug && Template::plugin_is_closed() ) {
+					$section_content = '<div class="plugin-notice notice ' . $message['notice_type'] . ' notice-alt"><p>' . $message['message'] . '</p></div>';
+					if ( get_current_user_id() == get_post()->post_author ) {
+						$section_content .= '<div class="plugin-notice notice notice-info notice-alt"><p>'
+						                    . Template::plugin_closed_author_info()
+						                    . '</p></div><!-- .plugin-notice -->';
+					}
 				}
-				else if ( in_array( $section_slug, array( 'screenshots', 'installation', 'faq', 'changelog' ) ) && in_array( $status, array( 'closed', 'disabled' ) ) ) {
+				else if ( in_array( $section_slug, array( 'screenshots', 'installation', 'faq', 'changelog' ) ) && Template::plugin_is_closed() ) {
 			        $section_content = '';
 				}
 				else {
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php
index 55b0c6e4..ed913576 100644
--- wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php
+++ wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php
@@ -8,22 +8,19 @@
  */
 
 namespace WordPressdotorg\Plugin_Directory\Theme;
-use WordPressdotorg\Plugin_Directory\Plugin_Directory;
 use WordPressdotorg\Plugin_Directory\Template;
+
 ?>
 
 <div id="admin" class="section">
     <?php
-    $status  = get_post_status();
-    if ( in_array( $status, array( 'closed', 'disabled' ) ) ) {
-	    echo '<div class="plugin-notice notice notice-error notice-alt"><p>' . __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' ) . '</p></div>';
+    if ( Template::plugin_is_closed() ) {
+	    $message = Template::plugin_not_active_reason();
+	    echo '<div class="plugin-notice notice ' . $message['notice_type'] . ' notice-alt"><p>' . $message['message'] . '</p></div>';
 	    if ( get_current_user_id() == get_post()->post_author ) {
-		    echo '<div class="plugin-notice notice notice-info notice-alt"><p>' .
-		                        sprintf(
-		                        /* translators: 1: plugins@wordpress.org */
-			                        __( 'If you did not request this change, please contact <a href="mailto:%1$s">%1$s</a> for a status. All developers with commit access are contacted when a plugin is closed, with the reasons why, so check your spam email too.', 'wporg-plugins' ),
-			                        'plugins@wordpress.org'
-		                        ) . '</p></div><!-- .plugin-notice -->';
+		    echo '<div class="plugin-notice notice notice-info notice-alt"><p>'
+		         . Template::plugin_closed_author_info()
+		         . '</p></div><!-- .plugin-notice -->';
 	    }
     }
 
@@ -43,14 +40,14 @@ use WordPressdotorg\Plugin_Directory\Template;
 
 	<?php
 
-		$tags = (array) get_post_meta( $post->ID, 'tagged_versions', true );
+		$tags = (array) get_post_meta( get_the_ID(), 'tagged_versions', true );
 		// Sort the versions by version
 		usort( $tags, 'version_compare' );
 		// We'll want to add a Development Version if it exists
 		$tags[] = 'trunk';
 
 		// Remove the current version, this may be trunk.
-		$tags = array_diff( $tags, array( get_post_meta( $post->ID, 'stable_tag', true ) ) );
+		$tags = array_diff( $tags, array( get_post_meta( get_the_ID(), 'stable_tag', true ) ) );
 
 		// List Trunk, followed by the most recent non-stable release.
 		$tags = array_reverse( $tags );
@@ -63,13 +60,13 @@ use WordPressdotorg\Plugin_Directory\Template;
 			echo '<select class="previous-versions" onchange="getElementById(\'download-previous-link\').href=this.value;">';
 			foreach ( $tags as $version ) {
 				$text = ( 'trunk' == $version ? __( 'Development Version', 'wporg-plugins' ) : $version );
-				printf( '<option value="%s">%s</option>', esc_attr( Template::download_link( $post, $version ) ), esc_html( $text ) );
+				printf( '<option value="%s">%s</option>', esc_attr( Template::download_link( get_post(), $version ) ), esc_html( $text ) );
 			}
 			echo '</select> ';
 
 			printf(
 				'<a href="%s" id="download-previous-link" class="button">%s</a>',
-				esc_url( Template::download_link( $post, reset( $tags ) ) ),
+				esc_url( Template::download_link( get_post(), reset( $tags ) ) ),
 				__( 'Download', 'wporg-plugins' )
 			);
 		}
