83% visual-football-formation-ve

Code Review | Visual Football Formation VE

WordPress plugin Visual Football Formation VE scored83%from 54 tests.

About plugin

  • Plugin page: visual-football-f...
  • Plugin version: 1.06
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Jun 18, 2021
  • Latest release: Nov 16, 2022
  • Number of updates: 4
  • Update frequency: every 129.3 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /1,032 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼5.21ms] Passed 4 tests

Analyzing server-side resources used by Visual Football Formation VE
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.21 ▼7.82
Dashboard /wp-admin3.52 ▲0.2247.37 ▲0.44
Posts /wp-admin/edit.php3.63 ▲0.2846.54 ▲1.08
Add New Post /wp-admin/post-new.php6.10 ▲0.2280.92 ▼14.52
Media Library /wp-admin/upload.php3.44 ▲0.2238.87 ▲4.26
Layouts /wp-admin/admin.php?page=daextvffve-layouts3.6833.98
Help /wp-admin/admin.php?page=daextvffve-help3.4129.55
Soccer Engine /wp-admin/admin.php?page=daextvffve-soccer-engine3.4230.79
Options /wp-admin/admin.php?page=daextvffve-options3.4232.59
Formations /wp-admin/admin.php?page=daextvffve-formations3.6936.87

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 134 new files
Database: 2 new tables, 13 new options
New tables
wp_daextvffve_layout
wp_daextvffve_formation
New WordPress options
daextvffve_player_name_color
daextvffve_field_image_resolution
widget_theysaidso_widget
daextvffve_player_border_color
can_compress_scripts
db_upgraded
daextvffve_field_bottom_margin
daextvffve_field_top_margin
daextvffve_field_image
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for Visual Football Formation VE
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲22113.57 ▼0.836.01 ▲4.1643.04 ▼3.30
Dashboard /wp-admin2,261 ▲734.84 ▼0.96104.65 ▼14.9342.24 ▼0.71
Posts /wp-admin/edit.php2,147 ▲582.02 ▼0.0238.05 ▲2.3933.25 ▼1.23
Add New Post /wp-admin/post-new.php1,545 ▲317.48 ▼1.14666.11 ▲64.2452.64 ▼11.27
Media Library /wp-admin/upload.php1,443 ▲554.29 ▲0.0493.34 ▼3.3440.54 ▼4.30
Layouts /wp-admin/admin.php?page=daextvffve-layouts2,4993.4389.5544.72
Help /wp-admin/admin.php?page=daextvffve-help8502.0624.2124.20
Soccer Engine /wp-admin/admin.php?page=daextvffve-soccer-engine8962.0323.7628.62
Options /wp-admin/admin.php?page=daextvffve-options1,3092.9657.8633.36
Formations /wp-admin/admin.php?page=daextvffve-formations1,8114.1474.3729.23

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
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
  • 5× 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/visual-football-formation-ve/admin/view/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/visual-football-formation-ve/admin/view/formations.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/visual-football-formation-ve/admin/view/layouts.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/visual-football-formation-ve/admin/view/help.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/visual-football-formation-ve/admin/view/soccer-engine.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

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

"Visual Football Formation VE" version 1.06's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("visual-football-formation-ve.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin14,499 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript732,6938369,750
CSS13585702,803
PHP126833181,929
Markdown14017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity13.40
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods59
▷ Static methods58.47%
▷ Public methods5288.14%
▷ Protected methods00.00%
▷ Private methods711.86%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
34 PNG files occupy 2.21MB with 1.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/back-field.png11.72KB6.00KB▼ 48.85%
admin/assets/img/help-fdfdfd.png15.52KB0.53KB▼ 96.60%
public/assets/img/fields/field-3-med.png93.16KB41.71KB▼ 55.23%
admin/assets/img/search.png0.21KB0.21KB0.00%
admin/assets/img/help-f7f7f7.png15.86KB0.59KB▼ 96.25%