94% advanced-add-to-cart-for-woocommerce

Code Review | Advanced Add To Cart for WooCommerce

WordPress plugin Advanced Add To Cart for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-add-to-c...
  • Plugin version: 5.4.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.2-5.8.1
  • WordPress version: 5.9.2
  • First release: Jan 14, 2022
  • Latest release: Jan 14, 2022
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: antondrob2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 55 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Advanced Add To Cart for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0767.79 ▲11.42
Dashboard /wp-admin3.45 ▲0.0437.61 ▲0.08
Posts /wp-admin/edit.php3.67 ▲0.0443.33 ▼0.47
Add New Post /wp-admin/post-new.php6.91 ▼0.0697.80 ▼1,148.41
Media Library /wp-admin/upload.php3.33 ▲0.0328.75 ▲1.44

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Add To Cart for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,907 ▲16316.74 ▲0.739.89 ▲2.372.72 ▲0.32
Dashboard /wp-admin2,892 ▲346.10 ▼0.04119.12 ▼17.82173.37 ▼8.71
Posts /wp-admin/edit.php2,694 ▲63.24 ▲0.0163.98 ▼1.34142.91 ▼1.58
Add New Post /wp-admin/post-new.php1,668 ▼5118.82 ▼3.90425.56 ▲15.68193.64 ▼4.63
Media Library /wp-admin/upload.php1,698 ▲35.56 ▲0.07142.27 ▼14.23236.54 ▲34.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
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 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/advanced-add-to-cart-for-woocommerce/advanced-add-to-cart.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: ajax add to cart, add to cart, dynamic add to cart

advanced-add-to-cart-for-woocommerce/advanced-add-to-cart.php 85% from 13 tests

The main file in "Advanced Add To Cart for WooCommerce" v. 5.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-add-to-cart-for-woocommerce.php" instead of "advanced-add-to-cart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected285 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
No PNG images were found in this plugin