83% soccer-action

Code Review | Soccer Action

WordPress plugin Soccer Action scored83%from 54 tests.

About plugin

  • Plugin page: soccer-action
  • Plugin version: 1.05
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2021
  • Latest release: Nov 16, 2022
  • Number of updates: 3
  • Update frequency: every 158.7 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,293 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.62ms] Passed 4 tests

A check of server-side resources used by Soccer Action
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.55 ▼1.64
Dashboard /wp-admin3.49 ▲0.1850.30 ▼1.79
Posts /wp-admin/edit.php3.60 ▲0.2451.19 ▲3.03
Add New Post /wp-admin/post-new.php6.07 ▲0.1885.72 ▼22.09
Media Library /wp-admin/upload.php3.41 ▲0.1846.96 ▲9.47
Actions /wp-admin/admin.php?page=daextsocact-actions3.5038.11
Options /wp-admin/admin.php?page=daextsocact-options3.3838.48
Soccer Engine /wp-admin/admin.php?page=daextsocact-soccer-engine3.3833.74
Help /wp-admin/admin.php?page=daextsocact-help3.3827.79

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 211 new files
Database: 2 new tables, 11 new options
New tables
wp_daextsocact_action
wp_daextsocact_field
New WordPress options
widget_recent-posts
widget_theysaidso_widget
daextsocact_database_version
daextsocact_actions_menu_capability
daextsocact_margin_bottom
daextsocact_margin_top
can_compress_scripts
theysaidso_admin_options
daextsocact_label_font
widget_recent-comments
...

Browser metrics Passed 4 tests

Soccer Action: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲19313.84 ▼0.518.96 ▲7.0741.72 ▲1.09
Dashboard /wp-admin2,249 ▲725.50 ▼0.15100.17 ▲8.5143.09 ▲2.07
Posts /wp-admin/edit.php2,154 ▲541.99 ▼0.0237.31 ▲2.8036.29 ▼4.43
Add New Post /wp-admin/post-new.php1,554 ▲2823.03 ▲0.03653.58 ▼28.8268.36 ▼0.18
Media Library /wp-admin/upload.php1,454 ▲544.22 ▲0.0296.21 ▼1.4639.77 ▼4.59
Actions /wp-admin/admin.php?page=daextsocact-actions1,2782.5680.3138.38
Options /wp-admin/admin.php?page=daextsocact-options1,0322.4436.8232.91
Soccer Engine /wp-admin/admin.php?page=daextsocact-soccer-engine9052.0024.3027.47
Help /wp-admin/admin.php?page=daextsocact-help8552.0327.7123.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-action/admin/view/actions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-action/admin/view/soccer-engine.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-action/admin/view/help.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-action/admin/view/options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

soccer-action/init.php 92% from 13 tests

"Soccer Action" version 1.05's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("soccer-action.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin15,054 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript702,6808519,669
CSS12811943,792
PHP126612621,576
Markdown14017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity21.67
▷ Minimum class complexity3.00
▷ Maximum class complexity70.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods54
▷ Static methods611.11%
▷ Public methods4481.48%
▷ Protected methods00.00%
▷ Private methods1018.52%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
115 PNG files occupy 0.71MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
shared/assets/img/red-player-black-skin/red-black-kick-2-left.png4.73KB2.01KB▼ 57.41%
shared/assets/img/blue-player-white-skin/blue-white-stand-frontal.png3.94KB1.91KB▼ 51.67%
shared/assets/img/ball/ball-ccr-trail-225.png4.90KB1.86KB▼ 61.99%
shared/assets/img/ball/ball-ccr-trail-0.png2.80KB1.74KB▼ 37.88%
shared/assets/img/red-player-black-skin/red-black-sprint-left.png4.66KB2.05KB▼ 55.90%