10% a2z-ups-shipping

Code Review | Automated UPS Shipping for WooCommerce

WordPress plugin Automated UPS Shipping for WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: a2z-ups-shipping
  • Plugin version: 3.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.8
  • WordPress version: 5.9.2
  • First release: Nov 11, 2018
  • Latest release: Jul 15, 2021
  • Number of updates: 60
  • Update frequency: every 16.3 days
  • Top authors: hitstacks (90%)a2zplugins (11.67%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 6,186 total downloads


Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/a2z-ups-shipping/a2zups_basic.php+32
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/a2z-ups-shipping/a2zups_basic.php:32
    Stack trace:
    #0 wp-includes/class-wp-hook.php(309): hit_woo_ups_plugin_activation()
    #1 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(474): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(716): do_action()

Server metrics [RAM: ▲0.73MB] [CPU: ▼293.12ms] Passed 4 tests

Server-side resources used by Automated UPS Shipping for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.7553.11 ▲1.17
Dashboard /wp-admin4.16 ▲0.7534.53 ▼1.51
Posts /wp-admin/edit.php4.39 ▲0.7539.79 ▲2.21
Add New Post /wp-admin/post-new.php7.63 ▲0.6695.54 ▼1,172.80
Media Library /wp-admin/upload.php4.04 ▲0.7525.85 ▲0.68

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Automated UPS Shipping for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.94 ▲0.196.34 ▲0.372.30 ▼1.20
Dashboard /wp-admin2,892 ▲346.14 ▼0.03115.92 ▼34.51156.56 ▼35.64
Posts /wp-admin/edit.php2,688 ▼63.25 ▲0.0061.53 ▼1.62139.55 ▼6.35
Add New Post /wp-admin/post-new.php1,661 ▼016.94 ▲0.34434.50 ▲53.67158.17 ▲1.26
Media Library /wp-admin/upload.php1,698 ▼05.52 ▲0.06133.71 ▼3.75181.95 ▼2.78

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
Even though no errors were found, this is by no means 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
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WeightPackStrategy' not found in wp-content/plugins/a2z-ups-shipping/controllors/classes/weight_pack/class-hit-weight-strategy-simple.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WeightPackStrategy' not found in wp-content/plugins/a2z-ups-shipping/controllors/classes/weight_pack/class-hit-weight-strategy-ascend.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WeightPackStrategy' not found in wp-content/plugins/a2z-ups-shipping/controllors/classes/weight_pack/class-hit-weight-strategy-descend.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: You can look at the official readme.txt

a2z-ups-shipping/a2zups_basic.php 77% from 13 tests

"Automated UPS Shipping for WooCommerce" version 3.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0.1" instead of "2.6")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("a2z-ups-shipping.php" instead of "a2zups_basic.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin5,507 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 124)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity56.58
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity7.54
▷ Minimum method complexity1.00
▷ Maximum method complexity124.00
Code structure
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9491.26%
▷ Protected methods00.00%
▷ Private methods98.74%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
controllors/views/hups.png7.16KB3.46KB▼ 51.69%
controllors/views/ups_logo.png4.57KB2.93KB▼ 35.94%