84% sportspress-for-baseball

Code Review | SportsPress for Baseball

WordPress plugin SportsPress for Baseball scored 84% from 54 tests.

About plugin

  • Plugin page: sportspress-for-b...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Aug 27, 2020
  • Number of updates: 14
  • Update frequency: every 115.1 days
  • Top authors: brianmiyaji (64.29%)ThemeBoy (42.86%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 11,918 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.18ms] Passed 4 tests

An overview of server-side resources used by SportsPress for Baseball
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.53 ▼6.61
Dashboard /wp-admin3.44 ▲0.1449.54 ▲0.11
Posts /wp-admin/edit.php3.49 ▲0.1449.88 ▼4.27
Add New Post /wp-admin/post-new.php5.96 ▲0.08101.22 ▲4.37
Media Library /wp-admin/upload.php3.30 ▲0.0837.97 ▲2.05
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.3733.26

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SportsPress for Baseball
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.24 ▼1.144.98 ▲3.2940.06 ▼14.48
Dashboard /wp-admin2,234 ▲465.83 ▼0.07104.65 ▲5.0042.47 ▼2.10
Posts /wp-admin/edit.php2,128 ▲392.08 ▲0.0535.88 ▼4.8137.94 ▲1.22
Add New Post /wp-admin/post-new.php1,564 ▲3018.45 ▼4.74592.19 ▼84.3555.35 ▼3.57
Media Library /wp-admin/upload.php1,430 ▲454.27 ▲0.0794.28 ▼4.6343.44 ▲1.55
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins9662.0823.8828.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/sportspress-for-baseball/includes/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

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

The principal PHP file in "SportsPress for Baseball" v. 1.0.2 is loaded by WordPress automatically on each request
45 characters long description:
A suite of baseball 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
Good job! No executable or dangerous file extensions detected2,017 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35271,6871,963
PO File12215251
CSS1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity45.88
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods119
▷ Static methods86.72%
▷ Public methods9478.99%
▷ Protected methods2319.33%
▷ Private methods21.68%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin