84% sportspress-for-ice-hockey

Code Review | SportsPress for Ice Hockey

WordPress plugin SportsPress for Ice Hockey scored 84% from 54 tests.

About plugin

  • Plugin page: sportspress-for-i...
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2
  • WordPress version: 6.3.1
  • First release: Oct 11, 2019
  • Latest release: Oct 11, 2019
  • Number of updates: 4
  • Update frequency: every 82.5 days
  • Top authors: ThemeBoy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 11,529 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
Installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼2.22ms] Passed 4 tests

This is a short check of server-side resources used by SportsPress for Ice Hockey
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4243.58 ▲3.49
Dashboard /wp-admin3.74 ▲0.4450.11 ▲4.43
Posts /wp-admin/edit.php3.80 ▲0.4450.62 ▲0.02
Add New Post /wp-admin/post-new.php6.26 ▲0.3789.73 ▼15.98
Media Library /wp-admin/upload.php3.61 ▲0.3740.83 ▲3.58
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.6735.75

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by SportsPress for Ice Hockey
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.29 ▼1.111.71 ▼0.0937.91 ▼7.34
Dashboard /wp-admin2,237 ▲854.88 ▼0.76110.63 ▲1.9942.11 ▼1.72
Posts /wp-admin/edit.php2,128 ▲362.05 ▲0.0339.94 ▼0.8237.42 ▼1.16
Add New Post /wp-admin/post-new.php1,555 ▲2023.47 ▲0.36658.00 ▲34.4260.01 ▲13.96
Media Library /wp-admin/upload.php1,430 ▲394.22 ▲0.0299.37 ▼7.1346.47 ▲0.81
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins9622.0828.9229.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/sportspress-for-ice-hockey/includes/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

sportspress-for-ice-hockey/sportspress-for-ice-hockey.php Passed 13 tests

"SportsPress for Ice Hockey" version 0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
47 characters long description:
A suite of ice hockey features for SportsPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,858 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35031,6521,855
CSS1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity43.88
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods108
▷ Static methods76.48%
▷ Public methods8376.85%
▷ Protected methods2321.30%
▷ Private methods21.85%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.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
There are no PNG files in this plugin