78% flexible-shipping-fedex

Code Review | Shipping Live Rates for FedEx for WooCommerce

WordPress plugin Shipping Live Rates for FedEx for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: flexible-shipping...
  • Plugin version: 2.7.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Sep 4, 2019
  • Latest release: Nov 23, 2023
  • Number of updates: 137
  • Update frequency: every 11.3 days
  • Top authors: wpdesk (53.28%)octolize (47.45%)

Code review

54 tests

User reviews

17 reviews

Install metrics

2,000+ active /99,973 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.61MB] [CPU: ▲5.87ms] Passed 4 tests

An overview of server-side resources used by Shipping Live Rates for FedEx for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.07 ▲1.6143.67 ▲2.70
Dashboard /wp-admin4.94 ▲1.6350.85 ▼0.82
Posts /wp-admin/edit.php4.96 ▲1.6058.67 ▲11.46
Add New Post /wp-admin/post-new.php7.49 ▲1.60101.30 ▲10.29
Media Library /wp-admin/upload.php4.94 ▲1.7144.26 ▲11.30

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3,527 new files
Database: no new tables, 8 new options
New WordPress options
plugin_activation_flexible-shipping-fedex/flexible-shipping-fedex.php
widget_theysaidso_widget
db_upgraded
can_compress_scripts
wpdesk_requirements_plugins_data
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Shipping Live Rates for FedEx for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.14 ▼0.211.71 ▼0.0138.71 ▼7.94
Dashboard /wp-admin2,204 ▲245.62 ▼0.0492.69 ▲5.1741.60 ▲1.62
Posts /wp-admin/edit.php2,109 ▲62.10 ▲0.1338.84 ▼1.3336.79 ▼1.03
Add New Post /wp-admin/post-new.php1,536 ▲1023.29 ▲0.27637.54 ▲13.5361.80 ▲13.66
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.03104.73 ▲6.5745.99 ▲3.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • plugin_activation_flexible-shipping-fedex/flexible-shipping-fedex.php
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/wpdesk/wp-woocommerce-shipping/src/WooCommerceShipping/ShippingMethod/Traits/view/shipping-method-java-script-custom-services.php
    • > /wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/wpdesk/wp-fedex-shipping-method/src/WooCommerceShipping/views/settings-scrips.php
    • > /wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/wpdesk/wp-woocommerce-shipping/src/WooCommerceShipping/ShippingMethod/Traits/view/shipping-method-java-script-fallback.php
    • > /wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/wpdesk/wp-woocommerce-shipping/src/WooCommerceShipping/ShippingMethod/Traits/view/shipping-method-java-script-free-shipping.php
    • > /wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/wpdesk/wp-woocommerce-shipping/src/WooCommerceShipping/ShippingMethod/Traits/view/shipping-method-java-script-custom-origin.php
  • 3167× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FedExVendor\\FedEx\\AbstractComplexType' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/octolize/php-fedex-api-wrapper/src/FedEx/LocationsService/ComplexType/WebAuthenticationCredential.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'FedExVendor\\FedEx\\AbstractSimpleType' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/octolize/php-fedex-api-wrapper/src/FedEx/TrackService/SimpleType/TrackDeliveryOptionType.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FedExVendor\\FedEx\\AbstractComplexType' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/octolize/php-fedex-api-wrapper/src/FedEx/AddressValidationService/ComplexType/WebAuthenticationDetail.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'FedExVendor\\FedEx\\AbstractSimpleType' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/octolize/php-fedex-api-wrapper/src/FedEx/ValidationAvailabilityAndCommitmentService/SimpleType/CustomDeliveryWindowType.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'FedExVendor\\WPDesk\\AbstractShipping\\Settings\\SettingsValues' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsValuesAsArray.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'FedExVendor\\FedEx\\AbstractSimpleType' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/octolize/php-fedex-api-wrapper/src/FedEx/PickupService/SimpleType/WebServiceEnvironment.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FedExVendor\\FedEx\\AbstractSimpleType' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/octolize/php-fedex-api-wrapper/src/FedEx/ValidationAvailabilityAndCommitmentService/SimpleType/DamageStatusType.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FedExVendor\\FedEx\\AbstractComplexType' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/octolize/php-fedex-api-wrapper/src/FedEx/ValidationAvailabilityAndCommitmentService/ComplexType/ShippingDocumentFormat.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'FedExVendor\\FedEx\\AbstractSimpleType' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/octolize/php-fedex-api-wrapper/src/FedEx/ValidationAvailabilityAndCommitmentService/SimpleType/RequestedShippingDocumentType.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FedExVendor\\FedEx\\AbstractSimpleType' not found in wp-content/plugins/flexible-shipping-fedex/vendor_prefixed/octolize/php-fedex-api-wrapper/src/FedEx/PickupService/SimpleType/WeighingScaleType.php:13

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: shipping method, woocommerce fedex, live rates, fedex, fedex shipping...

flexible-shipping-fedex/flexible-shipping-fedex.php 92% from 13 tests

The main PHP file in "Shipping Live Rates for FedEx for WooCommerce" ver. 2.7.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "5.8")

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
Good job! No executable or dangerous file extensions detected99,705 lines of code in 3,492 files:
LanguageFilesBlank linesComment linesLines of code
PHP3,4187,051103,78794,067
XML3003,735
JSON31001,437
SVG2200179
CSS7242131
JavaScript981131
Markdown25025

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.62
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces152
Interfaces97
Traits23
Classes3,258
▷ Abstract classes180.55%
▷ Concrete classes3,24099.45%
▷ Final classes250.77%
Methods10,059
▷ Static methods1141.13%
▷ Public methods9,57395.17%
▷ Protected methods2132.12%
▷ Private methods2732.71%
Functions49
▷ Named functions1428.57%
▷ Anonymous functions3571.43%
Constants7,453
▷ Global constants30.04%
▷ Class constants7,45099.96%
▷ Public constants7,41499.52%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/octolize.com.png88.91KB39.07KB▼ 56.06%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/logo.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/wpdesk.net.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/wpdesk.pl.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/flexibleshipping.com.png5.63KB3.68KB▼ 34.58%