10% a2z-fedex-shipping

Code Review | Automated FedEx live/manual rates with shipping labels - HPOS supported

WordPress plugin Automated FedEx live/manual rates with shipping labels - HPOS supported scored10%from 54 tests.

About plugin

  • Plugin page: a2z-fedex-shipping
  • Plugin version: 4.4.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 13, 2018
  • Latest release: Nov 16, 2023
  • Number of updates: 129
  • Update frequency: every 14.2 days
  • Top authors: hitstacks (96.9%)a2zplugins (3.88%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /43,258 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/a2z-fedex-shipping/a2zfedex_basic.php+41
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/a2z-fedex-shipping/a2zfedex_basic.php:41
    Stack trace:
    #0 wp-includes/class-wp-hook.php(312): hit_woo_fedex_plugin_activation()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲0.52MB] [CPU: ▼1.06ms] Passed 4 tests

A check of server-side resources used by Automated FedEx live/manual rates with shipping labels - HPOS supported
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5242.28 ▲0.06
Dashboard /wp-admin3.83 ▲0.5247.96 ▼0.46
Posts /wp-admin/edit.php3.94 ▲0.5849.86 ▲7.02
Add New Post /wp-admin/post-new.php6.41 ▲0.5296.74 ▼5.96
Media Library /wp-admin/upload.php3.75 ▲0.5235.61 ▲2.12

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Automated FedEx live/manual rates with shipping labels - HPOS supported
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.70 ▼0.011.82 ▼0.1843.65 ▼1.13
Dashboard /wp-admin2,195 ▲245.62 ▼0.0297.46 ▼3.9237.08 ▼6.18
Posts /wp-admin/edit.php2,103 ▼02.00 ▼0.0139.99 ▲1.6036.17 ▲0.21
Add New Post /wp-admin/post-new.php1,526 ▼022.99 ▼0.31744.94 ▲139.7152.75 ▲4.97
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0199.20 ▼5.1643.85 ▼1.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 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-fedex-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-fedex-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-fedex-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
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: fedex woocommerce, fedex, shipping, fedex shipping, woocommerce fedex

a2z-fedex-shipping/a2zfedex_basic.php 77% from 13 tests

The main PHP script in "Automated FedEx live/manual rates with shipping labels - HPOS supported" version 4.4.4 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("a2z-fedex-shipping.php" instead of "a2zfedex_basic.php")
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: Required version must match the one declared in readme.txt ("4.0.1" instead of "2.6")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin7,579 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP146727586,677
XML400870
JSON10032

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 293)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity80.77
▷ Minimum class complexity1.00
▷ Maximum class complexity491.00
Average method complexity9.79
▷ Minimum method complexity1.00
▷ Maximum method complexity293.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods119
▷ Static methods00.00%
▷ Public methods10084.03%
▷ Protected methods00.00%
▷ Private methods1915.97%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ 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.08MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
controllors/views/hfedex.png5.93KB3.08KB▼ 48.01%
controllors/views/fedex.png71.44KB18.16KB▼ 74.58%