94% acl-floating-cart-for-woocommerce

Code Review | ACL Floating Cart for WooCommerce

WordPress plugin ACL Floating Cart for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: acl-floating-cart...
  • Plugin version: 0.9
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 5.8.1
  • First release: Dec 10, 2019
  • Latest release: Dec 10, 2019
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: amadercode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 900 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by ACL Floating Cart for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1235.13 ▲12.37
Dashboard /wp-admin3.06 ▲0.0043.93 ▲6.77
Posts /wp-admin/edit.php3.11 ▲0.0035.49 ▼2.85
Add New Post /wp-admin/post-new.php5.42 ▼0.0278.94 ▼576.51
Media Library /wp-admin/upload.php3.00 ▲0.0030.44 ▼7.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by ACL Floating Cart for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.88 ▲0.268.80 ▼2.2945.09 ▼2.42
Dashboard /wp-admin2,967 ▲336.08 ▲0.02133.01 ▼7.48106.24 ▼6.57
Posts /wp-admin/edit.php2,736 ▼32.71 ▼0.0157.68 ▼13.6388.93 ▼5.85
Add New Post /wp-admin/post-new.php1,872 ▼1,70519.11 ▲4.30374.85 ▼120.36113.15 ▼22.69
Media Library /wp-admin/upload.php1,810 ▲35.03 ▼0.00140.35 ▼5.34117.70 ▲1.35

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 completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acl-floating-cart-for-woocommerce/includes/admin/focawo-info-page.php:8
    • > PHP Notice
      Trying to get property 'cart' of non-object in wp-content/plugins/acl-floating-cart-for-woocommerce/templates/template1/cart.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_cart() on null in wp-content/plugins/acl-floating-cart-for-woocommerce/templates/template1/cart.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acl-floating-cart-for-woocommerce/includes/admin/focawo-addons.php:8
    • > PHP Notice
      Trying to get property 'cart' of non-object in wp-content/plugins/acl-floating-cart-for-woocommerce/templates/template2/cart.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_cart() on null in wp-content/plugins/acl-floating-cart-for-woocommerce/templates/template2/cart.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: instant shopping cart, floating cart, drawer cart, woo floating cart, floating cart for woocommerce

acl-floating-cart-for-woocommerce/acl-floating-cart.php 85% from 13 tests

The main PHP script in "ACL Floating Cart for WooCommerce" version 0.9 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("acl-floating-cart-for-woocommerce.php" instead of "acl-floating-cart.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin2,424 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP122194211,103
CSS32010713
Sass6955518
JavaScript521990

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.83
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods45
▷ Static methods24.44%
▷ Public methods4497.78%
▷ Protected methods00.00%
▷ Private methods12.22%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cart-icon.png2.60KB1.53KB▼ 41.14%
assets/images/close-icon.png2.68KB1.58KB▼ 40.95%