84% wp-roster

Code Review | WP Roster

WordPress plugin WP Roster scored84%from 54 tests.

About plugin

  • Plugin page: wp-roster
  • Plugin version: 2.30
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 16, 2018
  • Latest release: Sep 29, 2022
  • Number of updates: 38
  • Update frequency: every 40.5 days
  • Top authors: northernbeacheswebsites (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,335 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: ▲0.53MB] [CPU: ▼4.46ms] Passed 4 tests

An overview of server-side resources used by WP Roster
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5546.00 ▲6.16
Dashboard /wp-admin3.84 ▲0.5055.40 ▼9.87
Posts /wp-admin/edit.php3.96 ▲0.6048.47 ▼5.71
Add New Post /wp-admin/post-new.php6.42 ▲0.54105.40 ▼8.43
Media Library /wp-admin/upload.php3.76 ▲0.5444.65 ▲6.79

Server storage [IO: ▲1.85MB] [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: 51 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Roster
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,017 ▲24617.03 ▲2.7240.57 ▲38.6162.05 ▲19.68
Dashboard /wp-admin2,261 ▲705.88 ▲1.02110.93 ▲8.8242.44 ▼3.29
Posts /wp-admin/edit.php2,148 ▲592.01 ▼0.0334.63 ▼7.3132.07 ▼3.19
Add New Post /wp-admin/post-new.php1,532 ▲1223.34 ▲0.15640.79 ▼10.0846.18 ▼2.74
Media Library /wp-admin/upload.php1,444 ▲564.12 ▼0.09112.32 ▲4.5049.64 ▲6.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-roster/inc/shortcode/roster-shortcode.php:147
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/wp-roster/inc/templates/roster-template.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-roster/inc/functions/helper-functions.php:292
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-roster/inc/functions/user-profile.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-roster/wp-roster.php:67

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

wp-roster/wp-roster.php Passed 13 tests

This is the main PHP file of "WP Roster" version 2.30, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
A robust roster system for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin16,616 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
CSS854210510,547
JavaScript201,4921,2562,963
PHP131,8738422,857
SVG201249

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions66
▷ Named functions6598.48%
▷ Anonymous functions11.52%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/default-image.png7.41KB3.90KB▼ 47.34%
inc/images/default-idea-image.png4.36KB2.34KB▼ 46.34%