84% sportspress-for-basketball

Code Review | SportsPress for Basketball

WordPress plugin SportsPress for Basketball scored84%from 54 tests.

About plugin

  • Plugin page: sportspress-for-b...
  • Plugin version: 0.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Nov 7, 2016
  • Latest release: Aug 27, 2020
  • Number of updates: 9
  • Update frequency: every 154.6 days
  • Top authors: ThemeBoy (55.56%)brianmiyaji (55.56%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /33,469 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.78ms] Passed 4 tests

Analyzing server-side resources used by SportsPress for Basketball
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.14 ▲4.84
Dashboard /wp-admin3.42 ▲0.1248.95 ▼0.13
Posts /wp-admin/edit.php3.47 ▲0.1247.69 ▼1.70
Add New Post /wp-admin/post-new.php5.94 ▲0.0598.70 ▼6.11
Media Library /wp-admin/upload.php3.28 ▲0.0540.22 ▲8.40
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.3534.80

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for SportsPress for Basketball
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.61 ▲0.061.73 ▼0.4242.87 ▲5.13
Dashboard /wp-admin2,222 ▲445.57 ▼0.0988.07 ▼16.4444.80 ▲1.46
Posts /wp-admin/edit.php2,139 ▲392.06 ▲0.0338.66 ▲1.5742.07 ▲5.41
Add New Post /wp-admin/post-new.php1,552 ▲2123.20 ▲0.00616.31 ▼61.3353.50 ▲2.52
Media Library /wp-admin/upload.php1,441 ▲414.25 ▲0.0797.27 ▼4.9645.55 ▲2.73
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins9922.0529.4334.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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 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-basketball/includes/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: players, stats, standings, data, statistics...

sportspress-for-basketball/sportspress-for-basketball.php Passed 13 tests

"SportsPress for Basketball" version 0.9.1'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 basketball features for SportsPress.

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
Everything looks great! No dangerous files found in this plugin1,874 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35071,6561,868
CSS1003
JavaScript1013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity44.25
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods109
▷ Static methods76.42%
▷ Public methods8477.06%
▷ Protected methods2321.10%
▷ Private methods21.83%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin