10% football-live-scores

Code Review | Football Live Scores

WordPress plugin Football Live Scores scored 10% from 54 tests.

About plugin

  • Plugin page: football-live-scores
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8.1
  • WordPress version: 5.9.2
  • First release: Sep 27, 2015
  • Latest release: Sep 23, 2021
  • Number of updates: 33
  • Update frequency: every 66.3 days
  • Top authors: macsonuclari (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

400+ active / 27,134 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, function 'msplugin_activate' not found or invalid function name

Server metrics [RAM: ▼0.27MB] [CPU: ▼298.74ms] Passed 4 tests

A check of server-side resources used by Football Live Scores
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1356.62 ▲9.04
Dashboard /wp-admin3.34 ▼0.0725.93 ▼7.82
Posts /wp-admin/edit.php3.46 ▼0.1826.33 ▼13.24
Add New Post /wp-admin/post-new.php6.12 ▼0.8687.49 ▼1,165.24
Media Library /wp-admin/upload.php3.34 ▲0.0423.08 ▼8.64
Live Scores /wp-admin/options-general.php?page=livescore-plugin3.3223.47

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 1 new option
New WordPress options
Live_Scores_Options

Browser metrics Passed 4 tests

Checking browser requirements for Football Live Scores
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,985 ▲26316.58 ▲0.938.83 ▲2.332.90 ▲0.44
Dashboard /wp-admin2,962 ▲1076.21 ▲0.04119.16 ▼19.43167.47 ▲7.14
Posts /wp-admin/edit.php2,759 ▲713.37 ▲0.0264.70 ▼0.00157.25 ▲17.21
Add New Post /wp-admin/post-new.php1,681 ▼7120.21 ▼0.81449.07 ▼27.71153.72 ▼5.72
Media Library /wp-admin/upload.php1,768 ▲735.59 ▲0.07161.00 ▲17.60208.76 ▲17.44
Live Scores /wp-admin/options-general.php?page=livescore-plugin1,3272.5755.34138.65

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
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, function 'msplugin_deactivate' not found or invalid function name
  • This plugin does not fully uninstall, leaving 1 option in the database
    • Live_Scores_Options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=livescore-plugin
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method ms_Main::show_admin_notice() should not be called statically

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/football-live-scores/views/global-settings/page-header.php
    • > /wp-content/plugins/football-live-scores/includes/admin-notice-helper/admin-notice-helper.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'ms_Module' not found in wp-content/plugins/football-live-scores/classes/ms-show.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/football-live-scores/includes/admin-notice-helper/admin-notice.php:1
    • > PHP Notice
      Undefined variable: setting_logo_path in wp-content/plugins/football-live-scores/views/global-settings/page-header.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/football-live-scores/livescore.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ms_Main' not found in wp-content/plugins/football-live-scores/views/global-settings/page-notice.php:58
    • > PHP Fatal error
      Uncaught Error: Class 'ms_Module' not found in wp-content/plugins/football-live-scores/classes/ms-main.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/football-live-scores/infot.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Donate link: Invalid URI ("")
  • Screenshots: Add images for these screenshots: #1 (Live Score Desktop Screen Size - screenshot-1.jpg), #2 (Live Score Pad Screen Size - screenshot-2.jpg), #3 (Live Score Phone Screen Size - screenshot-3.jpg)
You can take inspiration from this readme.txt

football-live-scores/livescore.php 92% from 13 tests

This is the main PHP file of "Football Live Scores" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("football-live-scores.php" instead of "livescore.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 plugin568 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11141143476
JavaScript215948
CSS23025
Markdown17019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity6.40
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods27
▷ Static methods1244.44%
▷ Public methods2385.19%
▷ Protected methods414.81%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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%