84% cric-zumo

Code Review | Cric Zumo Cricket Scoreboards and Odds Plugin

WordPress plugin Cric Zumo Cricket Scoreboards and Odds Plugin scored84%from 54 tests.

About plugin

  • Plugin page: cric-zumo
  • Plugin version: 0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.1.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2019
  • Latest release: May 30, 2019
  • Number of updates: 18
  • Update frequency: every 3.9 days
  • Top authors: criczumo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,582 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.57ms] Passed 4 tests

This is a short check of server-side resources used by Cric Zumo Cricket Scoreboards and Odds Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.20 ▲2.36
Dashboard /wp-admin3.34 ▲0.0446.29 ▲0.92
Posts /wp-admin/edit.php3.39 ▲0.0451.87 ▼1.33
Add New Post /wp-admin/post-new.php5.94 ▲0.0690.15 ▼12.66
Media Library /wp-admin/upload.php3.27 ▲0.0434.15 ▼1.20

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cric Zumo Cricket Scoreboards and Odds Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲15414.38 ▲0.098.26 ▲6.5740.19 ▼1.21
Dashboard /wp-admin2,243 ▲555.14 ▲0.0499.50 ▼12.4490.04 ▲48.89
Posts /wp-admin/edit.php2,131 ▲422.28 ▲0.2437.84 ▼5.8735.32 ▼0.75
Add New Post /wp-admin/post-new.php1,543 ▲2923.66 ▲6.13674.04 ▲36.7635.25 ▼26.69
Media Library /wp-admin/upload.php1,422 ▲404.37 ▲0.1596.78 ▼2.6884.51 ▲41.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_criczumo_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/cric-zumo/includes/plugin_mainpage_wrapper.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_rand() in wp-content/plugins/cric-zumo/includes/scoreboard_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cric-zumo/criczumo.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: scoreboard, livescores, cricket odds, live scoreboard, cricket

cric-zumo/criczumo.php 92% from 13 tests

The primary PHP file in "Cric Zumo Cricket Scoreboards and Odds Plugin" version 0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cric-zumo.php" instead of "criczumo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin11,179 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS255106,566
JavaScript68395073,784
PHP429127541
SVG100288

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/cricketball16px.png0.78KB0.87KB0.00%
includes/images/wrong.png0.75KB0.50KB▼ 33.29%
includes/images/plugin-header.png30.26KB6.78KB▼ 77.59%
includes/images/tick.png0.68KB0.48KB▼ 28.57%
includes/images/hs.png2.62KB7.54KB0.00%