94% woo-autoload-cart

Code Review | WooCommerce Autoload Cart

WordPress plugin WooCommerce Autoload Cart scored 94% from 53 tests.

About plugin

  • Plugin page: woo-autoload-cart
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 5.8.1
  • First release: Oct 29, 2015
  • Latest release: Nov 9, 2015
  • Number of updates: 11
  • Update frequency: every 1.0 days
  • Top authors: jamiechong (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 784 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by WooCommerce Autoload Cart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1231.34 ▲10.21
Dashboard /wp-admin3.06 ▲0.0142.82 ▲6.35
Posts /wp-admin/edit.php3.11 ▲0.0143.57 ▲1.39
Add New Post /wp-admin/post-new.php5.42 ▼0.0185.04 ▼1,049.11
Media Library /wp-admin/upload.php3.00 ▼0.0033.92 ▼3.15

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

Input-output and database impact of this plugin
The plugin 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 WooCommerce Autoload Cart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,674 ▲9215.91 ▼0.078.87 ▼0.4848.67 ▲1.06
Dashboard /wp-admin2,934 ▲845.89 ▲0.11137.53 ▲2.28104.14 ▼6.98
Posts /wp-admin/edit.php2,706 ▼02.69 ▼0.0063.74 ▼1.5293.55 ▲2.91
Add New Post /wp-admin/post-new.php1,851 ▲19817.75 ▼1.02359.30 ▼18.51106.25 ▼0.80
Media Library /wp-admin/upload.php1,775 ▲65.00 ▼0.01147.50 ▼6.31104.32 ▼5.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
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 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-autoload-cart/includes/class-icwoo.php
    • > /wp-content/plugins/woo-autoload-cart/autoload-cart.php

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: products, instant, woocommerce, one click, checkout...

woo-autoload-cart/autoload-cart.php 92% from 13 tests

The main file in "WooCommerce Autoload Cart" v. 1.2 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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-autoload-cart.php" instead of "autoload-cart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected484 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP210127462
HTML12022

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods414.29%
▷ Public methods1657.14%
▷ Protected methods1242.86%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin