83% product-configurator-for-woocommerce

Code Review | Product Configurator for WooCommerce

WordPress plugin Product Configurator for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: product-configura...
  • Plugin version: 1.2.57
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6-6.4
  • WordPress version: 6.3.1
  • First release: Mar 19, 2020
  • Latest release: Nov 29, 2023
  • Number of updates: 188
  • Update frequency: every 7.2 days
  • Top authors: mklacroix (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

2,000+ active /64,649 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.22ms] Passed 4 tests

Server-side resources used by Product Configurator for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.80 ▲0.99
Dashboard /wp-admin3.34 ▼0.0045.82 ▼16.05
Posts /wp-admin/edit.php3.39 ▲0.0444.67 ▼3.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.12 ▼20.53
Media Library /wp-admin/upload.php3.26 ▲0.0434.60 ▼1.06

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Configurator for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4214.31 ▲0.071.74 ▼0.1646.26 ▲2.11
Dashboard /wp-admin2,209 ▲285.60 ▼0.0794.97 ▼18.8538.95 ▼4.74
Posts /wp-admin/edit.php2,115 ▲152.04 ▲0.0234.33 ▼4.7135.53 ▼0.41
Add New Post /wp-admin/post-new.php1,535 ▲623.12 ▲0.15684.06 ▲96.1452.46 ▼0.85
Media Library /wp-admin/upload.php1,414 ▲114.18 ▼0.0299.00 ▲0.6140.71 ▼0.43

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please take a closer look at the following
  • 137× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/guzzlehttp/psr7/src/NoSeekStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Imagick\\Commands\\ResizeCommand' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/WidenCommand.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/RotateCommand.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BackupCommand.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Exception\\ImageException' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/intervention/image/src/Intervention/Image/Exception/NotReadableException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/intervention/image/src/Intervention/Image/Commands/EllipseCommand.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/intervention/image/src/Intervention/Image/Commands/OrientateCommand.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Imagick\\Commands\\ResizeCommand' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/HeightenCommand.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GetSizeCommand.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/product-configurator-for-woocommerce/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/TrimCommand.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: product addons, customize, woocommerce, configure

product-configurator-for-woocommerce/woocommerce-mkl-product-configurator.php 85% from 13 tests

"Product Configurator for WooCommerce" version 1.2.57's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("product-configurator-for-woocommerce.php" instead of "woocommerce-mkl-product-configurator.php")
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin48,913 lines of code in 376 files:
LanguageFilesBlank linesComment linesLines of code
PHP2373,8517,03217,053
Sass221,47745712,776
CSS1138715710,379
JavaScript871,0298676,570
Markdown65420866
PO File2280301620
JSON700610
SVG30128
XML10011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.05
▷ Minimum class complexity1.00
▷ Maximum class complexity109.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces17
Interfaces14
Traits2
Classes190
▷ Abstract classes84.21%
▷ Concrete classes18295.79%
▷ Final classes2212.09%
Methods1,076
▷ Static methods898.27%
▷ Public methods92485.87%
▷ Protected methods474.37%
▷ Private methods1059.76%
Functions109
▷ Named functions6761.47%
▷ Anonymous functions4238.53%
Constants34
▷ Global constants823.53%
▷ Class constants2676.47%
▷ Public constants1557.69%

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
21 PNG files occupy 1.27MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/addons/mkl-pc-stock-management.png2.21KB2.30KB0.00%
assets/admin/images/addons/mkl-pc-form-fields.png3.31KB1.29KB▼ 60.96%
inc/themes/wsb/preview.png108.64KB116.41KB0.00%
inc/themes/old-default/preview.png81.24KB32.79KB▼ 59.64%
inc/themes/la-pomme/preview.png269.40KB88.62KB▼ 67.11%