Index: trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php
===================================================================
--- trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php	(revision 5231)
+++ trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php	(working copy)
@@ -1,6 +1,8 @@
 <?php
 namespace WordPressdotorg\Plugin_Directory\Admin\Metabox;
 
+use WordPressdotorg\Plugin_Directory\Tools;
+
 /**
  * The Plugin Review metabox.
  *
@@ -7,8 +9,17 @@
  * @package WordPressdotorg\Plugin_Directory\Admin\Metabox
  */
 class Review_Tools {
-	static function display() {
+
+	static function display() {		
 		$post = get_post();
+		$author = get_user_by( 'id', $post->post_author );
+		$slug = $post->post_name;
+		$author_plugins = get_posts( array(
+			'author'       => $author->ID,
+			'post_type'    => 'plugin',
+			'post__not_in' => array( $post->ID ),
+		) );
+		$author_commit  = Tools::get_users_write_access_plugins( $author );
 
 		$zip_url = '';
 		foreach ( get_attached_media( 'application/zip', $post ) as $zip_file ) {
@@ -24,6 +35,21 @@
 				sprintf( '<a href="%s">%s</a>', esc_url( $zip_url ), esc_html( $zip_url ) )
 			);
 		}
+		
+		if ( $post->post_status == 'draft' || $post->post_status == 'pending' ) {
+			
+			$flagged = array(
+				'low' => array (),
+				'med' => array (),
+				'high' => array (),
+			);
+						
+			echo "<p><strong>Flagged!</strong>";
+		
+			$reserved_slugs = array (
+				// Commonly abused/misused terms
+				'wordpress', 'woocommerce', 'google', 'youtube', 'twitter', 'facebook', 'yoast', 'jetpack',
+			);
 
 		if ( 'pending' != $post->post_status ) {
 			echo "<ul>
@@ -36,18 +62,99 @@
 			echo '<p>' . strip_tags( $post->post_excerpt ) . '</p>';
 		}
 
+			// User account was registered less than 2 weeks ago (but longer than 3 days) (user is still fairly new)
+			$twoweeksago  = time() - (2 * 7 * 24 * 60 * 60);
+			$threedaysago = time() - (3 * 1 * 24 * 60 * 60);
+			if ( strtotime($author->user_registered) > $twoweeksago && strtotime($author->user_registered) < $threedaysago )  array_push( $flagged['low'], __( 'account registered less than 2 weeks ago', 'wporg-plugins' ) );
+			if ( strtotime($author->user_registered) > $threedaysago ) array_push( $flagged['low'], __( 'account registered less than 3 days ago', 'wporg-plugins' ) );
+
+			// Username ends in numbers
+			if ( is_numeric(substr($author->user_login, -1, 1) ) ) array_push( $flagged['low'], __( 'username ends in numbers', 'wporg-plugins' ) );
+			
+			// User has no URL
+			if ( empty( $author->user_url ) ) array_push( $flagged['low'], __( 'account has no URL', 'wporg-plugins' ) );
+			
+			// URL matches the weird list
+			$weird_urls = array (
+				'blogger', 'blogspot', 'example.com', 'weebly', 'squarespace', 'medium.com', 'yahoo.com',
+				'mail.com', 'example.org',
+			);
+			foreach ( $weird_urls as $url ) {
+				if ( stripos( $author->user_url , $url ) !== false ) 
+					array_push( $flagged['med'], __( 'account URL contains ', 'wporg-plugins' ) . $url );
+				if ( stripos( $author->user_email , $url ) !== false ) 
+					array_push( $flagged['med'], __( 'account email contains ', 'wporg-plugins' ) . $url );
+			}
+		
+			// Reserved slugs are also often abused domain names (trademark law sucks)
+			foreach ( $reserved_slugs as $url ) {
+				if ( stripos( $author->user_url , $url ) !== false ) 
+					array_push( $flagged['high'], __( 'account URL contains ', 'wporg-plugins' ) . $url );
+				if ( stripos( $author->user_email , $url ) !== false )
+					array_push( $flagged['med'], __( 'account email contains ', 'wporg-plugins' ) . $url );
+			}
+
+			// User Behavior
+			// If FORUM ROLE is blocked
+			if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) ) {
+				$user = new \WP_User( $post->post_author, '', WPORG_SUPPORT_FORUMS_BLOGID );
+				if ( ! empty( $user->allcaps['bbp_blocked'] ) ) 
+					array_push( $flagged['high'], __( 'user is blocked', 'wporg-plugins' ) );	
+			}
+			
+			// No plugins
+			if ( empty( $author_commit ) && empty( $author_plugins ) ) 
+				array_push( $flagged['low'], __( 'user has no plugins', 'wporg-plugins' ) );
+
+			// Echo flag results (everyone pretty much has at least one)
+			echo "<ul class=\"plugin-flagged\">";
+			$noflag = 0;
+			foreach ( $flagged as $flag => $reasons ) {
+				if (count($reasons) > '0') {
+					$allreasons = array();
+					echo "<li class=\"plugin-flagged-".$flag."\"><strong>".strtoupper($flag)." (".count($reasons)."):</strong> ";
+					foreach( $reasons as $reason) {
+						$allreasons[] = $reason;
+					}
+					echo implode( '; ', $allreasons ) . "</li>";
+				} else {
+					$noflag++;
+				}
+			}
+			
+			if ($noflag == '3' ) {
+				?><li><?php _e( 'Nothing flagged! You found Matt!', 'wporg-plugins' ); ?></li><?php
+			}
+			
+			echo "</ul>";
+
+		} else {
+			echo "<ul>
+				<li><a href='https://plugins.trac.wordpress.org/log/{$post->post_name}/'>" . __( 'Development Log', 'wporg-plugins' ) . "</a></li>
+				<li><a href='https://plugins.svn.wordpress.org/{$post->post_name}/'>" . __( 'Subversion Repository', 'wporg-plugins' ) . "</a></li>
+				<li><a href='https://plugins.trac.wordpress.org/browser/{$post->post_name}/'>" . __( 'Browse in Trac', 'wporg-plugins' ) . '</a></li>
+			</ul>';	
+		}
+
 		add_filter( 'wp_comment_reply', function( $string ) use ( $post ) {
 			$author = get_user_by( 'id', $post->post_author );
+			
+			$type   = 'Notice';
+			if ( $post->post_status == 'draft' || $post->post_status == 'pending' ) {
+				$type = 'Request';
+			}
+			
 			?>
 			<form id="contact-author" class="contact-author" method="POST" action="https://supportpress.wordpress.org/plugins/thread-new.php">
 				<input type="hidden" name="to_email" value="<?php echo esc_attr( $author->user_email ); ?>" />
 				<input type="hidden" name="to_name" value="<?php echo esc_attr( $author->display_name ); ?>" />
-				<input type="hidden" name="subject" value="<?php printf( esc_attr__( '[WordPress Plugin Directory] Request: %s', 'wporg-plugins' ), $post->post_title ); ?>" />
+				<input type="hidden" name="subject" value="<?php printf( esc_attr__( '[WordPress Plugin Directory] %s: %s', 'wporg-plugins' ), $notice, $post->post_title ); ?>" />
 				<button class="button button-primary" type="submit"><?php _e( 'Contact plugin author', 'wporg-plugins' ); ?></button>
 			</form>
 			<?php
 			return $string;
-		} );
+		} 
+		);
 	}
-}
 
+}
\ No newline at end of file
