68% soccer-live-scores

Code Review | Soccer Live Scores

WordPress plugin Soccer Live Scores scored68%from 54 tests.

About plugin

  • Plugin page: soccer-live-scores
  • Plugin version: 1.03
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 20, 2021
  • Latest release: Nov 8, 2023
  • Number of updates: 4
  • Update frequency: every 210.5 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,179 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼5.45ms] Passed 4 tests

Analyzing server-side resources used by Soccer Live Scores
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.35 ▼2.97
Dashboard /wp-admin3.66 ▲0.3649.33 ▼3.18
Posts /wp-admin/edit.php3.71 ▲0.3647.46 ▲2.49
Add New Post /wp-admin/post-new.php6.18 ▲0.2983.95 ▼15.37
Media Library /wp-admin/upload.php3.52 ▲0.3035.18 ▼0.29
Help /wp-admin/admin.php?page=daextsolisc-help3.4931.69
Options /wp-admin/admin.php?page=daextsolisc-options3.5033.54
Events /wp-admin/admin.php?page=daextsolisc-events3.7634.73
Soccer Engine /wp-admin/admin.php?page=daextsolisc-soccer-engine3.5034.58
Matches /wp-admin/admin.php?page=daextsolisc-matches3.8138.15
Event Types /wp-admin/admin.php?page=daextsolisc-event-types3.6439.73

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 124 new files
Database: 3 new tables, 16 new options
New tables
wp_daextsolisc_match
wp_daextsolisc_event_type
wp_daextsolisc_event
New WordPress options
widget_recent-comments
daextsolisc_text_primary_color
can_compress_scripts
widget_theysaidso_widget
daextsolisc_top_margin
daextsolisc_google_fonts
daextsolisc_separator_color
db_upgraded
daextsolisc_bottom_margin
daextsolisc_text_secondary_color
...

Browser metrics Passed 4 tests

Checking browser requirements for Soccer Live Scores
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲20713.78 ▼0.629.31 ▲7.5978.83 ▲35.45
Dashboard /wp-admin2,260 ▲795.66 ▼0.0690.22 ▼18.5339.01 ▼5.54
Posts /wp-admin/edit.php2,162 ▲622.03 ▲0.0734.66 ▼1.2635.46 ▼1.10
Add New Post /wp-admin/post-new.php1,560 ▲3123.46 ▼0.02696.29 ▲29.5055.86 ▲4.80
Media Library /wp-admin/upload.php1,462 ▲594.22 ▼0.0095.88 ▼3.2841.05 ▼3.43
Help /wp-admin/admin.php?page=daextsolisc-help8652.0126.5035.20
Options /wp-admin/admin.php?page=daextsolisc-options1,3343.0458.2235.80
Events /wp-admin/admin.php?page=daextsolisc-events9312.2554.1931.30
Soccer Engine /wp-admin/admin.php?page=daextsolisc-soccer-engine9132.0023.8328.53
Matches /wp-admin/admin.php?page=daextsolisc-matches1,5094.2980.2931.71
Event Types /wp-admin/admin.php?page=daextsolisc-event-types1,4773.7274.7438.93

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
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Daextsolisc_Admin' does not have a method 'dc_deactivate'
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daextsolisc-options
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-live-scores/admin/view/soccer-engine.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-live-scores/admin/view/help.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-live-scores/admin/view/events.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-live-scores/admin/view/event_types.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-live-scores/admin/view/matches.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-live-scores/admin/view/options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

soccer-live-scores/init.php 92% from 13 tests

"Soccer Live Scores" version 1.03's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("soccer-live-scores.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected15,237 lines of code in 103 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript732,6568249,719
CSS15631772,993
PHP149534412,508
Markdown14017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.33
▷ Minimum class complexity2.00
▷ Maximum class complexity28.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods74
▷ Static methods79.46%
▷ Public methods6689.19%
▷ Protected methods00.00%
▷ Private methods810.81%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/edit-hover.png1.30KB0.33KB▼ 74.47%
admin/assets/img/search-hover.png0.21KB0.21KB0.00%
admin/assets/img/trash-hover.png1.13KB0.19KB▼ 83.13%
admin/assets/img/help-fdfdfd.png15.52KB0.53KB▼ 96.60%
public/assets/img/goal.png0.32KB0.24KB▼ 26.97%