diff --git src/wp-admin/includes/plugin.php src/wp-admin/includes/plugin.php
index a357779..f4958a3 100644
--- src/wp-admin/includes/plugin.php
+++ src/wp-admin/includes/plugin.php
@@ -182,35 +182,59 @@ function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup
  * @param string $plugin Plugin ID
  * @return array List of files relative to the plugin root.
  */
-function get_plugin_files($plugin) {
+function get_plugin_files( $plugin ) {
 	$plugin_file = WP_PLUGIN_DIR . '/' . $plugin;
-	$dir = dirname($plugin_file);
-	$plugin_files = array($plugin);
-	if ( is_dir($dir) && $dir != WP_PLUGIN_DIR ) {
-		$plugins_dir = @ opendir( $dir );
+	$dir =  WP_PLUGIN_DIR . '/' . current( explode( '/', $plugin, 2 ) );
+	$plugin_files = array( $plugin );
+	if ( is_dir( $dir ) && $dir != WP_PLUGIN_DIR ) {
+		$plugins_dir = @opendir( $dir );
 		if ( $plugins_dir ) {
-			while (($file = readdir( $plugins_dir ) ) !== false ) {
-				if ( substr($file, 0, 1) == '.' )
+			$plugin_basedir = plugin_basename( $dir );
+			while ( ( $file = readdir( $plugins_dir ) ) !== false ) {
+				if ( substr( $file, 0, 1 ) == '.' ) {
 					continue;
+				}
 				if ( is_dir( $dir . '/' . $file ) ) {
-					$plugins_subdir = @ opendir( $dir . '/' . $file );
-					if ( $plugins_subdir ) {
-						while (($subfile = readdir( $plugins_subdir ) ) !== false ) {
-							if ( substr($subfile, 0, 1) == '.' )
-								continue;
-							$plugin_files[] = plugin_basename("$dir/$file/$subfile");
-						}
-						@closedir( $plugins_subdir );
-					}
+					$subfiles = _get_plugin_sub_files( $dir . '/' . $file );
+					$plugin_files = array_merge( $plugin_files, $subfiles );
 				} else {
-					if ( plugin_basename("$dir/$file") != $plugin )
-						$plugin_files[] = plugin_basename("$dir/$file");
+					if ( "$plugin_basedir/$file" != $plugin )
+						$plugin_files[] = "$plugin_basedir/$file";
 				}
 			}
 			@closedir( $plugins_dir );
 		}
 	}
+	return $plugin_files;
+}
 
+/**
+ * Returns a recursive list of a plugin's sub files.
+ *
+ * @since 4.2.0
+ * @access private
+ *
+ * @param string $subdir Sub directory path.
+ * @return array List of files relative to the sub directoy root.
+ */
+function _get_plugin_sub_files( $subdir ) {
+	$plugins_subdir = @opendir( $subdir );
+	if ( $plugins_subdir ) {
+		$plugin_basedir = plugin_basename( $subdir );
+		$plugin_files = array();
+		while ( ( $subfile = readdir( $plugins_subdir ) ) !== false ) {
+			if ( substr( $subfile, 0, 1 ) == '.' ) {
+				continue;
+			}
+			if ( is_dir( $subdir  . '/' . $subfile ) ) {
+				$subfiles = _get_plugin_sub_files( $subdir . '/' . $subfile );
+				$plugin_files = array_merge( $plugin_files, $subfiles );
+			} else {
+				$plugin_files[] = "$plugin_basedir/$subfile";	
+			}
+		}
+		@closedir( $plugins_subdir );
+	}
 	return $plugin_files;
 }
 
diff --git src/wp-admin/plugin-editor.php src/wp-admin/plugin-editor.php
index 1c24295..1abe221 100644
--- src/wp-admin/plugin-editor.php
+++ src/wp-admin/plugin-editor.php
@@ -199,12 +199,11 @@ default:
 <?php
 	foreach ( $plugins as $plugin_key => $a_plugin ) {
 		$plugin_name = $a_plugin['Name'];
-		if ( $plugin_key == $plugin )
-			$selected = " selected='selected'";
-		else
-			$selected = '';
-		$plugin_name = esc_attr($plugin_name);
-		$plugin_key = esc_attr($plugin_key);
+		$plugin_parts = explode( '/', $plugin );
+		$plugin_key_parts = explode( '/', $plugin_key );
+		$selected = $plugin_key_parts[0] == $plugin_parts[0] ? " selected='selected'" : '';
+		$plugin_name = esc_attr( $plugin_name );
+		$plugin_key = esc_attr( $plugin_key );
 		echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>";
 	}
 ?>
@@ -220,19 +219,36 @@ default:
 
 	<ul>
 <?php
-foreach ( $plugin_files as $plugin_file ) :
+foreach ( $plugin_files as $key => $plugin_file ) :
 	// Get the extension of the file
-	if ( preg_match('/\.([^.]+)$/', $plugin_file, $matches) ) {
+	if ( preg_match( '/\.([^.]+)$/', $plugin_file, $matches ) ) {
 		$ext = strtolower($matches[1]);
 		// If extension is not in the acceptable list, skip it
-		if ( !in_array( $ext, $editable_extensions ) )
+		if ( ! in_array( $ext, $editable_extensions ) ) {
 			continue;
+		}
 	} else {
 		// No extension found
 		continue;
 	}
+
+	// Don't show the file twice.
+	if ( $key > 0 && $plugin_file == $file ) {
+		continue;
+	}
+
+	$file_parts = explode( '/', $plugin_file );
+	$relative_file = str_replace( $file_parts[0] . '/', '', $plugin_file );
+	$file_description = get_file_description( WP_PLUGIN_DIR . '/' . $plugin_file );
+
+	if ( $file_description != $plugin_file ) {
+		$file_description .= '<br /><span class="nonessential">(' . $relative_file . ')</span>';
+	}
+	if ( $plugin_file == $file ) {
+		$file_description = '<span class="highlight">' . $file_description . '</span>';
+	}
 ?>
-		<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ) ?>&amp;plugin=<?php echo urlencode( $plugin ) ?>"><?php echo $plugin_file ?></a></li>
+		<li><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ) ?>&amp;plugin=<?php echo urlencode( $plugin ) ?>"><?php echo $file_description ?></a></li>
 <?php endforeach; ?>
 	</ul>
 </div>
diff --git src/wp-admin/theme-editor.php src/wp-admin/theme-editor.php
index d0ecee4..fd4cea5 100644
--- src/wp-admin/theme-editor.php
+++ src/wp-admin/theme-editor.php
@@ -174,15 +174,21 @@ if ( $allowed_files ) :
 	endif;
 
 	foreach ( $allowed_files as $filename => $absolute_filename ) :
-		if ( 'style.css' == $filename )
+		if ( 'style.css' == $filename ) {
 			echo "\t</ul>\n\t<h3>" . _x( 'Styles', 'Theme stylesheets in theme editor' ) . "</h3>\n\t<ul>\n";
+		}
+
+		$relative_file = explode( $theme->offsetGet( 'Template' ) . '/', $absolute_filename );
+		$relative_file = ! empty( $relative_file[1] ) ? $relative_file[1] : basename( $filename );
 
 		$file_description = get_file_description( $absolute_filename );
-		if ( $file_description != basename( $filename ) )
-			$file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>';
 
-		if ( $absolute_filename == $file )
+		if ( $file_description != $relative_file ) {
+			$file_description .= '<br /><span class="nonessential">(' . $relative_file . ')</span>';
+		}
+		if ( $absolute_filename == $file ) {
 			$file_description = '<span class="highlight">' . $file_description . '</span>';
+		}
 ?>
 		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
 <?php
diff --git tests/phpunit/tests/admin/includesPlugin.php tests/phpunit/tests/admin/includesPlugin.php
index 15afaef..931ad82 100644
--- tests/phpunit/tests/admin/includesPlugin.php
+++ tests/phpunit/tests/admin/includesPlugin.php
@@ -92,6 +92,28 @@ class Tests_Admin_includesPlugin extends WP_UnitTestCase {
 		$name = 'hello.php';
 		$this->assertEquals( array( $name ), get_plugin_files( $name ) );
 	}
+	
+	/**
+	 * @covers ::get_plugin_files
+	 *
+	 * @ticket 6531
+	 */
+	public function test_get_plugin_files_beyond_two_levels_deep() {
+		mkdir( WP_PLUGIN_DIR . '/foo' );
+		mkdir( WP_PLUGIN_DIR . '/foo/bar' );
+		mkdir( WP_PLUGIN_DIR . '/foo/bar/baz' );
+		
+		$this->_create_plugin( '<?php\n//Foo', 'foo.php', WP_PLUGIN_DIR . '/foo' );
+		$this->_create_plugin( '<?php\n//Baz', 'baz.php', WP_PLUGIN_DIR . '/foo/bar/baz' );
+		$this->assertEquals( Array ( 'foo/foo.php', 'foo/bar/baz/baz.php' ), get_plugin_files( 'foo/foo.php' ) );
+		
+		// Clean up.
+		unlink( WP_PLUGIN_DIR . '/foo/foo.php' );
+		unlink( WP_PLUGIN_DIR . '/foo/bar/baz/baz.php' );
+		rmdir( WP_PLUGIN_DIR . '/foo/bar/baz' );
+		rmdir( WP_PLUGIN_DIR . '/foo/bar' );
+		rmdir( WP_PLUGIN_DIR . '/foo' );
+	}
 
 	/**
 	 * @covers ::get_mu_plugins
