84% wp-directory-listing

Code Review | WordPress Directory Listing

WordPress plugin WordPress Directory Listing scored84%from 54 tests.

About plugin

  • Plugin page: wp-directory-listing
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 10, 2019
  • Latest release: May 13, 2019
  • Number of updates: 19
  • Update frequency: every 4.9 days
  • Top authors: pluginrox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.11MB] [CPU: ▲4.93ms] Passed 4 tests

An overview of server-side resources used by WordPress Directory Listing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.66 ▲1.2052.57 ▲12.52
Dashboard /wp-admin4.42 ▲1.0854.55 ▼7.03
Posts /wp-admin/edit.php4.47 ▲1.1257.04 ▲13.40
Add New Post /wp-admin/post-new.php7.02 ▲1.1492.59 ▲1.57
Media Library /wp-admin/upload.php4.34 ▲1.1247.54 ▲12.67
Settings /wp-admin/edit.php?post_type=directory&page=wpdl4.3143.08
Keyword /wp-admin/edit-tags.php?taxonomy=directory_tags&post_type=directory4.3440.75
Locations /wp-admin/edit.php?post_type=location4.3944.93
Directory Category /wp-admin/edit-tags.php?taxonomy=directory_cat&post_type=directory4.3443.49
Add Directory /wp-admin/post-new.php?post_type=directory4.4958.66
Directories /wp-admin/edit.php?post_type=directory4.3944.07

Server storage [IO: ▲1.46MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 122 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Directory Listing
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲21013.63 ▼0.7812.21 ▲10.4144.73 ▲3.11
Dashboard /wp-admin2,253 ▲624.91 ▲0.0097.89 ▼8.1566.50 ▲25.08
Posts /wp-admin/edit.php2,149 ▲602.20 ▲0.1634.09 ▼1.5935.69 ▲0.48
Add New Post /wp-admin/post-new.php1,563 ▲4923.28 ▲5.63668.14 ▲9.7353.37 ▲1.35
Media Library /wp-admin/upload.php1,447 ▲624.19 ▲0.0095.73 ▼4.5480.89 ▲37.59
Settings /wp-admin/edit.php?post_type=directory&page=wpdl8741.9427.6226.42
Keyword /wp-admin/edit-tags.php?taxonomy=directory_tags&post_type=directory1,3002.2928.2430.15
Locations /wp-admin/edit.php?post_type=location1,1202.1630.8732.24
Directory Category /wp-admin/edit-tags.php?taxonomy=directory_cat&post_type=directory1,3312.2928.1833.14
Add Directory /wp-admin/post-new.php?post_type=directory2,7958.27201.36146.06
Directories /wp-admin/edit.php?post_type=directory1,1232.1731.4431.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-directory-listing/includes/classes/class-responses-list.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-directory-listing/includes/classes/class-responses-list.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-directory-listing/assets/i18n/states/TZ.php:14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-directory-listing/includes/classes/class-responses-list.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were found

wp-directory-listing/wp-directory-listing.php Passed 13 tests

"WordPress Directory Listing" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
38 characters long description:
Directory Listing Plugin for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin12,217 lines of code in 114 files:
LanguageFilesBlank linesComment linesLines of code
PHP1011,9131,5675,744
CSS9296653,638
SVG1002,671
JavaScript36441164

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity32.54
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods184
▷ Static methods179.24%
▷ Public methods16388.59%
▷ Protected methods31.63%
▷ Private methods189.78%
Functions65
▷ Named functions6295.38%
▷ Anonymous functions34.62%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/directory.png19.20KB8.16KB▼ 57.51%