94% woocommerce-variable-product-ajax

Code Review | Woocommerce Variable Product Ajax

WordPress plugin Woocommerce Variable Product Ajax scored 94% from 54 tests.

About plugin

  • Plugin page: woocommerce-varia...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0.1
  • WordPress version: 5.8.1
  • First release: Mar 1, 2015
  • Latest release: Mar 2, 2015
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: llavillaccama (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,328 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼140.86ms] Passed 4 tests

An overview of server-side resources used by Woocommerce Variable Product Ajax
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1332.90 ▲5.06
Dashboard /wp-admin3.06 ▲0.0146.69 ▲0.74
Posts /wp-admin/edit.php3.11 ▲0.0141.17 ▼3.70
Add New Post /wp-admin/post-new.php5.42 ▼0.0188.95 ▼563.01
Media Library /wp-admin/upload.php3.01 ▲0.0034.14 ▲2.52

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Variable Product Ajax
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,883 ▲28716.32 ▲0.9815.63 ▲3.0844.67 ▼5.38
Dashboard /wp-admin2,973 ▲455.87 ▼0.33152.87 ▼4.03108.06 ▲5.44
Posts /wp-admin/edit.php2,769 ▲302.72 ▲0.0263.87 ▼1.6587.06 ▲0.76
Add New Post /wp-admin/post-new.php1,517 ▼9814.11 ▼6.85312.42 ▲1.84106.91 ▲3.48
Media Library /wp-admin/upload.php1,836 ▲1005.01 ▼0.04152.85 ▼2.27114.63 ▼0.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-variable-product-ajax/woocommerce-variable-product-ajax.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-variable-product-ajax/inc/grid.php:2

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #7 (Woocommerce Variable Product Ajax 7) image not found
You can look at the official readme.txt

woocommerce-variable-product-ajax/woocommerce-variable-product-ajax.php Passed 13 tests

The primary PHP file in "Woocommerce Variable Product Ajax" version 1.00 is used by WordPress to initiate all plugin functionality
66 characters long description:
Add to cart functionality Ajax in Woocommerce for Variable Product

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected271 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP2118111
JavaScript31611107
CSS38753

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.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/success.png3.33KB0.40KB▼ 88.13%
img/jquery.fs.stepper-arrows.png0.30KB0.18KB▼ 40.52%
img/bg01.png0.91KB0.09KB▼ 89.56%
img/close.png0.95KB1.44KB0.00%