89% woocommerce-ajax-add-to-cart-for-variable-products

Code Review | Woocommerce Ajax add to cart for variable products

WordPress plugin Woocommerce Ajax add to cart for variable products scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-ajax-...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.6
  • WordPress version: 6.3.1
  • First release: Sep 12, 2014
  • Latest release: Dec 24, 2020
  • Number of updates: 37
  • Update frequency: every 62.1 days
  • Top authors: rcreators (100%)

Code review

54 tests

User reviews

37 reviews

Install metrics

2,000+ active /44,439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.52ms] Passed 4 tests

An overview of server-side resources used by Woocommerce Ajax add to cart for variable products
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.47 ▼2.85
Dashboard /wp-admin3.33 ▼0.0251.37 ▼18.11
Posts /wp-admin/edit.php3.38 ▲0.0251.05 ▼0.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.88 ▼8.68
Media Library /wp-admin/upload.php3.25 ▲0.0244.81 ▲8.90

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Ajax add to cart for variable products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.21 ▼1.371.63 ▼0.1345.53 ▲0.89
Dashboard /wp-admin2,221 ▲184.87 ▼0.16106.93 ▼1.0743.29 ▼3.60
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0837.48 ▼0.6136.26 ▼1.03
Add New Post /wp-admin/post-new.php1,545 ▼322.98 ▼0.05625.95 ▲13.4257.16 ▲0.60
Media Library /wp-admin/upload.php1,397 ▼34.13 ▼0.07117.37 ▲11.9147.92 ▼4.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.jpg) image required
  • Donate link: Invalid url: "NA"
You can look at the official readme.txt

woocommerce-ajax-add-to-cart-for-variable-products/woocommerce-ajax-add-to-cart-variable-products.php 92% from 13 tests

The main file in "Woocommerce Ajax add to cart for variable products" v. 2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-ajax-add-to-cart-for-variable-products.php" instead of "woocommerce-ajax-add-to-cart-variable-products.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected179 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1432798
JavaScript1331081

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin