78% soccer-formation-ve

Code Review | Soccer Formation VE

WordPress plugin Soccer Formation VE scored78%from 54 tests.

About plugin

  • Plugin page: soccer-formation-ve
  • Plugin version: 1.01
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Jun 17, 2021
  • Latest release: Nov 16, 2022
  • Number of updates: 3
  • Update frequency: every 172.4 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,369 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼2.25ms] Passed 4 tests

This is a short check of server-side resources used by Soccer Formation VE
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.39 ▲1.13
Dashboard /wp-admin3.65 ▲0.3450.16 ▲1.66
Posts /wp-admin/edit.php3.70 ▲0.3449.10 ▲2.18
Add New Post /wp-admin/post-new.php6.16 ▲0.2789.01 ▼13.25
Media Library /wp-admin/upload.php3.51 ▲0.2737.01 ▲1.46
Soccer Engine /wp-admin/admin.php?page=daextsfve-soccer-engine3.4832.73
Help /wp-admin/admin.php?page=daextsfve-help3.4734.27
Layouts /wp-admin/admin.php?page=daextsfve-layouts3.7535.23
Formations /wp-admin/admin.php?page=daextsfve-formations3.7037.01
Options /wp-admin/admin.php?page=daextsfve-options3.4833.39

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 114 new files
Database: 2 new tables, 19 new options
New tables
wp_daextsfve_formations
wp_daextsfve_layouts
New WordPress options
daextsfve_field_top_margin
daextsfve_font_family
daextsfve_field_bottom_margin
widget_recent-posts
daextsfve_player_name_color
daextsfve_player_number_color
daextsfve_field_bg_color
daextsfve_player_name_bg_color
theysaidso_admin_options
daextsfve_player_number_bg_color
...

Browser metrics Passed 4 tests

A check of browser resources used by Soccer Formation VE
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20113.51 ▼0.849.82 ▲8.3542.74 ▲5.63
Dashboard /wp-admin2,251 ▲745.53 ▼0.0486.40 ▼0.6640.66 ▼3.20
Posts /wp-admin/edit.php2,159 ▲621.99 ▼0.0434.16 ▼3.0236.77 ▲4.65
Add New Post /wp-admin/post-new.php1,555 ▲2923.48 ▼0.03696.59 ▲49.5354.41 ▼12.41
Media Library /wp-admin/upload.php1,456 ▲624.21 ▼0.0495.35 ▼4.7641.90 ▼1.77
Soccer Engine /wp-admin/admin.php?page=daextsfve-soccer-engine8912.0423.4125.99
Help /wp-admin/admin.php?page=daextsfve-help8612.0125.0624.82
Layouts /wp-admin/admin.php?page=daextsfve-layouts2,2143.4195.1751.15
Formations /wp-admin/admin.php?page=daextsfve-formations1,4953.0960.8628.92
Options /wp-admin/admin.php?page=daextsfve-options1,6732.8567.1131.11

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/soccer-formation-ve/shared/assets/img/player.php
    • > /wp-content/plugins/soccer-formation-ve/shared/assets/img/field.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-formation-ve/admin/view/formations.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-formation-ve/admin/view/soccer-engine.php:3
    • > PHP Notice
      Undefined index: player_name_bg_color in wp-content/plugins/soccer-formation-ve/shared/assets/img/player.php on line 13
    • > PHP Notice
      Undefined index: player_number_bg_color in wp-content/plugins/soccer-formation-ve/shared/assets/img/player.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-formation-ve/admin/view/layouts.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-formation-ve/admin/view/help.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/soccer-formation-ve/admin/view/options.php:3
    • > PHP Notice
      Undefined index: field_lines_color in wp-content/plugins/soccer-formation-ve/shared/assets/img/field.php on line 15
    • > PHP Notice
      Undefined index: field_bg_color in wp-content/plugins/soccer-formation-ve/shared/assets/img/field.php on line 14

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

soccer-formation-ve/init.php 92% from 13 tests

Analyzing the main PHP file in "Soccer Formation VE" version 1.01
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("soccer-formation-ve.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
No dangerous file extensions were detected14,735 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript712,7008759,741
CSS14591772,837
PHP147834212,140
Markdown14017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.80
▷ Minimum class complexity2.00
▷ Maximum class complexity27.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods75
▷ Static methods56.67%
▷ Public methods6789.33%
▷ Protected methods00.00%
▷ Private methods810.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
13 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/help-fdfdfd.png15.52KB0.53KB▼ 96.60%
admin/assets/img/clone-hover.png18.71KB0.12KB▼ 99.34%
admin/assets/img/edit-hover.png1.30KB0.33KB▼ 74.47%
admin/assets/img/help-f7f7f7.png15.86KB0.59KB▼ 96.25%
admin/assets/img/search-hover.png0.21KB0.21KB0.00%