89% visual-products-configurator-for-woocommerce

Code Review | Visual Product Configurator for Woocommerce Lite

WordPress plugin Visual Product Configurator for Woocommerce Lite scored 89% from 54 tests.

About plugin

  • Plugin page: visual-products-c...
  • Plugin version: 3.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 4, 2017
  • Latest release: Mar 22, 2023
  • Number of updates: 60
  • Update frequency: every 37.8 days
  • Top authors: mano88 (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

400+ active / 30,908 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.48ms] Passed 4 tests

Analyzing server-side resources used by Visual Product Configurator for Woocommerce Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0432.56 ▼13.06
Dashboard /wp-admin3.41 ▲0.1052.29 ▼2.97
Posts /wp-admin/edit.php3.52 ▲0.1656.56 ▲6.78
Add New Post /wp-admin/post-new.php6.01 ▲0.1293.90 ▲2.45
Media Library /wp-admin/upload.php3.33 ▲0.1039.94 ▲3.66
New configuration /wp-admin/post-new.php?post_type=vpc-config3.4453.05
Configurations /wp-admin/edit.php?post_type=vpc-config3.3740.16

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 143 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Visual Product Configurator for Woocommerce Lite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,659 ▼15213.83 ▲0.336.64 ▲0.8913.27 ▼37.58
Dashboard /wp-admin2,272 ▲634.93 ▲0.08114.75 ▼1.9475.51 ▲32.55
Posts /wp-admin/edit.php2,177 ▲882.31 ▲0.3141.78 ▲5.5045.69 ▲12.48
Add New Post /wp-admin/post-new.php1,426 ▼10718.48 ▼4.68666.07 ▲36.5041.46 ▼14.89
Media Library /wp-admin/upload.php1,460 ▲724.30 ▲0.07101.75 ▲3.1983.39 ▲41.36
New configuration /wp-admin/post-new.php?post_type=vpc-config1,8533.8767.47118.61
Configurations /wp-admin/edit.php?post_type=vpc-config1,1352.2434.7033.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
5 plugin tags: woocommerce composite products, woocommerce product customizer, woocommerce product configurator, woocommerce product designer, woocommerce product builder

visual-products-configurator-for-woocommerce/vpc.php 77% from 13 tests

"Visual Product Configurator for Woocommerce Lite" version 3.4.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("visual-products-configurator-for-woocommerce.php" instead of "vpc.php")
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 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 plugin18,246 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript281,4791,4239,298
CSS184122394,303
PHP176201,0183,889
SVG1503756

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity31.36
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods117
▷ Static methods1311.11%
▷ Public methods9782.91%
▷ Protected methods00.00%
▷ Private methods2017.09%
Functions38
▷ Named functions3797.37%
▷ Anonymous functions12.63%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
36 PNG files occupy 5.54MB with 3.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/vpc-logo.png1.09KB0.78KB▼ 28.79%
admin/images/form_builder.png6.41KB2.18KB▼ 65.97%
admin/images/home-page.png148.67KB41.69KB▼ 71.96%
admin/images/ninja-forms_old.png35.08KB9.10KB▼ 74.05%
admin/images/vpc-uci.png6.61KB2.24KB▼ 66.03%