72% live-scores

Code Review | Scores - Livescore for football, soccer, tennis, basketball, handball, volleyball & hockey

WordPress plugin Scores - Livescore for football, soccer, tennis, basketball, handball, volleyball & hockey scored72%from 54 tests.

About plugin

  • Plugin page: live-scores
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Nov 27, 2014
  • Latest release: Dec 18, 2015
  • Number of updates: 45
  • Update frequency: every 8.6 days
  • Top authors: lswjohn (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active /26,347 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.06MB] [CPU: ▼9.96ms] Passed 4 tests

This is a short check of server-side resources used by Scores - Livescore for football, soccer, tennis, basketball, handball, volleyball & hockey
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1143.78 ▲3.90
Dashboard /wp-admin3.34 ▼0.0036.96 ▼17.53
Posts /wp-admin/edit.php3.41 ▲0.0143.21 ▼12.99
Add New Post /wp-admin/post-new.php5.59 ▼0.3477.46 ▼11.68
Media Library /wp-admin/upload.php3.35 ▲0.0838.43 ▲2.35
Live Scores /wp-admin/options-general.php?page=live-scores-plugin-menu3.3232.35

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
Live_Scores_Options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Scores - Livescore for football, soccer, tennis, basketball, handball, volleyball & hockey
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15913.80 ▼0.578.12 ▲6.1043.44 ▲4.30
Dashboard /wp-admin2,237 ▲635.53 ▼0.0687.47 ▼5.4542.29 ▲3.14
Posts /wp-admin/edit.php2,145 ▲422.01 ▲0.0036.33 ▼6.0233.25 ▼3.23
Add New Post /wp-admin/post-new.php1,570 ▲3523.12 ▲5.10688.21 ▲64.9064.29 ▼10.94
Media Library /wp-admin/upload.php1,448 ▲484.24 ▲0.02103.56 ▼8.3543.55 ▼3.25
Live Scores /wp-admin/options-general.php?page=live-scores-plugin-menu9871.7126.8935.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • Live_Scores_Options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=live-scores-plugin-menu
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WLS_Main::show_admin_notice() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=live-scores-plugin-menu
    • > Notice in wp-content/plugins/live-scores/views/global-settings/page-notice.php+59
    Undefined index: wsw_initial_dt

SRP 0% 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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/live-scores/views/global-settings/page-header.php
    • > /wp-content/plugins/live-scores/includes/admin-notice-helper/admin-notice-helper.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: setting_logo_path in wp-content/plugins/live-scores/views/global-settings/page-header.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WLS_Module' not found in wp-content/plugins/live-scores/classes/wls-show.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/live-scores/livescore.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WLS_Main' not found in wp-content/plugins/live-scores/views/global-settings/page-notice.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/live-scores/includes/admin-notice-helper/admin-notice.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WLS_Module' not found in wp-content/plugins/live-scores/classes/wls-main.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/live-scores/infot.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 36 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Live Scores Settings), #2 (Live Scores in action.)
The official readme.txt might help

live-scores/livescore.php 85% from 13 tests

The main PHP script in "Scores - Livescore for football, soccer, tennis, basketball, handball, volleyball & hockey" version 2.1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("live-scores.php" instead of "livescore.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 237 characters long)

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
Good job! No executable or dangerous file extensions detected903 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11191166834
CSS23025
JavaScript16225
Markdown17019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.40
▷ Minimum class complexity3.00
▷ Maximum class complexity8.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods25
▷ Static methods1040.00%
▷ Public methods2184.00%
▷ Protected methods416.00%
▷ Private methods00.00%
Functions47
▷ Named functions4697.87%
▷ Anonymous functions12.13%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/blank.png0.27KB0.10KB▼ 61.68%