74% suspended-lists-for-sportspress

Code Review | Suspended Lists for SportsPress

WordPress plugin Suspended Lists for SportsPress scored74%from 54 tests.

About plugin

  • Plugin page: suspended-lists-f...
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 14, 2019
  • Latest release: Oct 9, 2022
  • Number of updates: 13
  • Update frequency: every 88.8 days
  • Top authors: leandroibarra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /999 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.61MB] [CPU: ▼50.06ms] Passed 4 tests

Server-side resources used by Suspended Lists for SportsPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.39 ▼1.087.07 ▼29.77
Dashboard /wp-admin2.41 ▼0.949.33 ▼49.94
Posts /wp-admin/edit.php2.41 ▼0.958.54 ▼37.99
Add New Post /wp-admin/post-new.php2.41 ▼3.488.97 ▼82.54
Media Library /wp-admin/upload.php2.41 ▼0.829.81 ▼25.99

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Suspended Lists for SportsPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.07 ▼0.282.00 ▲0.4344.11 ▲3.29
Dashboard /wp-admin2,204 ▲295.57 ▼0.0881.40 ▼21.4939.66 ▼0.02
Posts /wp-admin/edit.php2,108 ▲82.02 ▼0.0236.40 ▼0.1535.52 ▼3.17
Add New Post /wp-admin/post-new.php1,535 ▲922.98 ▲0.23593.65 ▼55.5571.67 ▲20.46
Media Library /wp-admin/upload.php1,410 ▲74.21 ▼0.0294.57 ▼21.4140.99 ▼5.66

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
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/sportspress/sportspress.php): failed to open stream: No such file or directory
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/suspended-lists-for-sportspress/suspended-lists-for-sportspress.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
6 plugin tags: suspended, sports club, players, sports data, suspended lists...

suspended-lists-for-sportspress/suspended-lists-for-sportspress.php Passed 13 tests

The primary PHP file in "Suspended Lists for SportsPress" version 0.0.2 is used by WordPress to initiate all plugin functionality
84 characters long description:
Build suspended players lists that discount automatically after each team match day.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,926 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP63415171,506
CSS2130240
PO File14761128
Markdown126051
JavaScript1001

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 155)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity51.40
▷ Minimum class complexity2.00
▷ Maximum class complexity163.00
Average method complexity6.36
▷ Minimum method complexity1.00
▷ Maximum method complexity155.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods47
▷ Static methods1225.53%
▷ Public methods3880.85%
▷ Protected methods00.00%
▷ Private methods919.15%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.50MB with 0.33MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-1.png143.45KB45.86KB▼ 68.03%
assets/images/screenshot-4.png90.38KB32.30KB▼ 64.26%
assets/images/screenshot-3.png115.29KB36.58KB▼ 68.27%
assets/images/screenshot-2.png159.76KB52.89KB▼ 66.89%