84% sportspress-for-cricket

Code Review | SportsPress for Cricket

WordPress plugin SportsPress for Cricket scored84%from 54 tests.

About plugin

  • Plugin page: sportspress-for-c...
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Sep 23, 2015
  • Latest release: Aug 27, 2020
  • Number of updates: 19
  • Update frequency: every 94.8 days
  • Top authors: brianmiyaji (89.47%)ThemeBoy (15.79%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /14,599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.49MB] [CPU: ▼6.44ms] Passed 4 tests

Server-side resources used by SportsPress for Cricket
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5242.04 ▲2.35
Dashboard /wp-admin3.84 ▲0.4948.78 ▼16.78
Posts /wp-admin/edit.php3.89 ▲0.5354.74 ▲3.98
Add New Post /wp-admin/post-new.php6.36 ▲0.4787.18 ▼13.79
Media Library /wp-admin/upload.php3.70 ▲0.4737.77 ▲2.45
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.7733.97

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SportsPress for Cricket
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.75 ▼0.645.01 ▲3.1638.77 ▼8.18
Dashboard /wp-admin2,237 ▲465.87 ▼0.02101.38 ▼5.8645.14 ▲7.69
Posts /wp-admin/edit.php2,128 ▲602.05 ▲0.0639.76 ▲3.5541.58 ▲10.12
Add New Post /wp-admin/post-new.php1,555 ▲2723.45 ▲4.99651.67 ▲12.7252.67 ▼2.41
Media Library /wp-admin/upload.php1,430 ▲424.30 ▲0.0697.44 ▼1.7247.32 ▲2.16
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins9662.0824.8431.75

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
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/sportspress-for-cricket/includes/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

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

The main PHP file in "SportsPress for Cricket" ver. 1.1.4 adds more information about the plugin and also serves as the entry point for this plugin
44 characters long description:
A suite of cricket 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
There were no executable files found in this plugin2,197 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP35641,7222,103
PO File13216666
CSS24115
JavaScript20113

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity51.00
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods121
▷ Static methods86.61%
▷ Public methods9679.34%
▷ Protected methods2319.01%
▷ Private methods21.65%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin