10% live-cricket-score

Code Review | Live Cricket Score

WordPress plugin Live Cricket Score scored10%from 54 tests.

About plugin

  • Plugin page: live-cricket-score
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2013
  • Latest release: Mar 29, 2016
  • Number of updates: 41
  • Update frequency: every 30.2 days
  • Top authors: promz (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

90+ active /16,787 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/live-cricket-score/live_cricket_score.php+76
    Methods with the same name as their class will not be constructors in a future version of PHP; cricket_score has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼54.38ms] Passed 4 tests

Server-side resources used by Live Cricket Score
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.37 ▼37.92
Dashboard /wp-admin2.10 ▼1.206.16 ▼54.86
Posts /wp-admin/edit.php2.11 ▼1.267.09 ▼44.02
Add New Post /wp-admin/post-new.php2.10 ▼3.796.28 ▼80.70
Media Library /wp-admin/upload.php2.10 ▼1.135.47 ▼28.17

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_cricket_score
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Live Cricket Score: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.44 ▼0.968.37 ▲6.7441.47 ▼2.01
Dashboard /wp-admin2,202 ▲285.62 ▼0.0296.16 ▲4.6840.08 ▼0.61
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0139.92 ▲1.2434.46 ▲0.74
Add New Post /wp-admin/post-new.php1,530 ▲423.01 ▼0.10689.04 ▼2.9760.96 ▲6.14
Media Library /wp-admin/upload.php1,398 ▲14.20 ▼0.04100.97 ▼5.5841.90 ▼6.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/live-cricket-score/live_cricket_score.php+76
    Methods with the same name as their class will not be constructors in a future version of PHP; cricket_score has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_cricket_score

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)
Everything seems fine, however this is by no means 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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/live-cricket-score/live_cricket_score.php:51
    • > PHP Warning
      file_get_contents(http://synd.cricbuzz.com/j2me/1.0/livematches.xml): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden\r in wp-content/plugins/live-cricket-score/lib/simple_html_dom.php on line 149

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: live cricket score, sports, cricket, cricket score

live-cricket-score/live_cricket_score.php 92% from 13 tests

"Live Cricket Score" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("live-cricket-score.php" instead of "live_cricket_score.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,091 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP33862761,390
JavaScript21016511
CSS250190

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity109.33
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods89
▷ Static methods11.12%
▷ Public methods7382.02%
▷ Protected methods1617.98%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
22 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/custom_submit.png0.97KB0.99KB0.00%
images/custom_hsb_b.png1.07KB0.82KB▼ 23.61%
images/custom_rgb_g.png1.04KB0.80KB▼ 23.67%
images/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%
images/colorpicker_submit.png0.96KB1.04KB0.00%