10% live-cricket-scores-widget

Code Review | Live Cricket Scores Widget

WordPress plugin Live Cricket Scores Widget scored10%from 54 tests.

About plugin

  • Plugin page: live-cricket-scor...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-3.9.2
  • WordPress version: 6.3.1
  • First release: May 13, 2014
  • Latest release: Aug 23, 2014
  • Number of updates: 14
  • Update frequency: every 10.8 days
  • Top authors: mtnandla (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /7,109 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
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/live-cricket-scores-widget/widget_class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; scoreboard_widget has a deprecated constructor

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

An overview of server-side resources used by Live Cricket Scores Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.49 ▼36.47
Dashboard /wp-admin2.09 ▼1.216.98 ▼43.54
Posts /wp-admin/edit.php2.09 ▼1.265.62 ▼44.50
Add New Post /wp-admin/post-new.php2.09 ▼3.796.55 ▼82.28
Media Library /wp-admin/upload.php2.09 ▼1.146.06 ▼30.43

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
widget_scoreboard_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Live Cricket Scores Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.74 ▲0.531.81 ▼0.3147.07 ▲2.66
Dashboard /wp-admin2,200 ▲125.83 ▲0.92102.31 ▼8.1939.81 ▼3.90
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0039.81 ▲2.2737.08 ▲1.71
Add New Post /wp-admin/post-new.php1,538 ▼423.30 ▲5.23663.32 ▲39.2961.03 ▲10.62
Media Library /wp-admin/upload.php1,391 ▲64.17 ▼0.04103.35 ▲2.0945.38 ▲0.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/live-cricket-scores-widget/widget_class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; scoreboard_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_scoreboard_widget
    • widget_theysaidso_widget
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/live-cricket-scores-widget/widget_class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/live-cricket-scores-widget/scoreboard_widget.php:12

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 errors were detected

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (A simple display of Live Cricket Score on the Sidebar as a Widget.)
You can take inspiration from this readme.txt

live-cricket-scores-widget/scoreboard_widget.php 92% from 13 tests

This is the main PHP file of "Live Cricket Scores Widget" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("live-cricket-scores-widget.php" instead of "scoreboard_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin70 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2444370

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods233.33%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 are no PNG files in this plugin