68% user-directory-shortcode

Code Review | User Directory Shortcode

WordPress plugin User Directory Shortcode scored 68% from 54 tests.

About plugin

  • Plugin page: user-directory-sh...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.5
  • WordPress version: 6.3.1
  • First release: Jan 3, 2013
  • Latest release: Jan 13, 2013
  • Number of updates: 4
  • Update frequency: every 4.8 days
  • Top authors: mackerelsky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,328 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.03ms] Passed 4 tests

An overview of server-side resources used by User Directory Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.38 ▲1.02
Dashboard /wp-admin3.34 ▲0.0444.96 ▼7.68
Posts /wp-admin/edit.php3.39 ▲0.0444.87 ▲3.20
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.66 ▼7.43
Media Library /wp-admin/upload.php3.26 ▲0.0434.83 ▲1.99
User Directory /wp-admin/users.php?page=mackerel-user-directory3.2834.81

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: 1 new table, 7 new options
New tables
wp_mackereluserdirectory
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
mackereluserdirectory_db_version

Browser metrics Passed 4 tests

Checking browser requirements for User Directory Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.19 ▼1.181.81 ▼0.0244.18 ▲1.06
Dashboard /wp-admin2,213 ▲226.04 ▲0.1299.61 ▼19.8342.37 ▼3.22
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0136.75 ▲1.4231.69 ▼3.04
Add New Post /wp-admin/post-new.php1,542 ▲918.55 ▼4.66597.57 ▼108.3856.73 ▼1.83
Media Library /wp-admin/upload.php1,386 ▼24.21 ▲0.0399.24 ▼10.8643.32 ▼4.14
User Directory /wp-admin/users.php?page=mackerel-user-directory7812.0324.5627.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_mackereluserdirectory
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • mackereluserdirectory_db_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/users.php?page=mackerel-user-directory
    • > Notice in wp-content/plugins/user-directory-shortcode/mackerel-user-directory.php+61
    Undefined index: save
    • > GET request to /wp-admin/users.php?page=mackerel-user-directory
    • > Notice in wp-content/plugins/user-directory-shortcode/mackerel-user-directory.php+88
    Undefined index: new
    • > GET request to /wp-admin/users.php?page=mackerel-user-directory
    • > Notice in wp-content/plugins/user-directory-shortcode/mackerel-user-directory.php+121
    Undefined index: load
    • > GET request to /wp-admin/users.php?page=mackerel-user-directory
    • > Notice in wp-content/plugins/user-directory-shortcode/mackerel-user-directory.php+163
    Undefined index: update

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/user-directory-shortcode/mackerel-user-directory.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === user-directory-shortcode === )
You can look at the official readme.txt

user-directory-shortcode/mackerel-user-directory.php 85% from 13 tests

The main PHP script in "User Directory Shortcode" version 0.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("user-directory-shortcode.php" instead of "mackerel-user-directory.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 223 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected578 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript166109363
PHP1838215

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin