10% staff-list-widget-proper-url

Code Review | A Staff List Plugin

WordPress plugin A Staff List Plugin scored10%from 54 tests.

About plugin

  • Plugin page: staff-list-widget...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Sep 22, 2012
  • Latest release: Oct 12, 2012
  • Number of updates: 6
  • Update frequency: every 3.5 days
  • Top authors: bythegram (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,544 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/staff-list-widget-proper-url/staff_list_plugin.php+105
    Methods with the same name as their class will not be constructors in a future version of PHP; staff_list_widget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼53.91ms] Passed 4 tests

A check of server-side resources used by A Staff List Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.65 ▼30.50
Dashboard /wp-admin2.09 ▼1.225.08 ▼53.38
Posts /wp-admin/edit.php2.09 ▼1.276.22 ▼46.35
Add New Post /wp-admin/post-new.php2.09 ▼3.805.97 ▼85.41
Media Library /wp-admin/upload.php2.09 ▼1.146.19 ▼27.27

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_staff_list_widget

Browser metrics Passed 4 tests

Checking browser requirements for A Staff List Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.29 ▼1.081.97 ▲0.3544.81 ▲7.08
Dashboard /wp-admin2,206 ▲185.83 ▼0.0096.74 ▼19.2136.36 ▼9.51
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0041.56 ▲3.7636.74 ▲4.20
Add New Post /wp-admin/post-new.php1,520 ▼1323.28 ▼0.12662.78 ▼27.1950.23 ▼10.95
Media Library /wp-admin/upload.php1,385 ▼34.24 ▲0.09104.04 ▼4.7647.61 ▲0.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/staff-list-widget-proper-url/staff_list_plugin.php+105
    Methods with the same name as their class will not be constructors in a future version of PHP; staff_list_widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_staff_list_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/staff-list-widget-proper-url/staff_list_plugin.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: widget area, staff list, website staff roles, user roles, widget

staff-list-widget-proper-url/staff_list_plugin.php 92% from 13 tests

This is the main PHP file of "A Staff List Plugin" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("staff-list-widget-proper-url.php" instead of "staff_list_plugin.php")

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
There were no executable files found in this plugin98 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11352581
CSS117117

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin