67% small-package-quotes-fedex-edition

Code Review | Small Package Quotes - For Customers of FedEx

WordPress plugin Small Package Quotes - For Customers of FedEx scored67%from 54 tests.

About plugin

  • Plugin page: small-package-quo...
  • Plugin version: 4.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2017
  • Latest release: Nov 21, 2023
  • Number of updates: 93
  • Update frequency: every 25.9 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,999 total downloads

Benchmarks

Plugin footprint 65% from 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 gracefully, with no errors

Server metrics [RAM: ▼0.85MB] [CPU: ▼35.35ms] Passed 4 tests

A check of server-side resources used by Small Package Quotes - For Customers of FedEx
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.30 ▼2.62
Dashboard /wp-admin3.10 ▼0.2424.18 ▼38.90
Posts /wp-admin/edit.php3.10 ▼0.2624.48 ▼22.42
Add New Post /wp-admin/post-new.php3.10 ▼2.7924.63 ▼71.64
Media Library /wp-admin/upload.php3.10 ▼0.1324.59 ▼8.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Small Package Quotes - For Customers of FedEx: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲16913.75 ▼0.619.69 ▲7.5944.03 ▼5.90
Dashboard /wp-admin2,209 ▲285.57 ▼0.1597.43 ▼11.9342.91 ▼3.42
Posts /wp-admin/edit.php2,118 ▲182.10 ▲0.1236.96 ▼1.8636.08 ▲0.36
Add New Post /wp-admin/post-new.php1,543 ▲1723.43 ▼0.02682.43 ▲26.1151.98 ▲1.80
Media Library /wp-admin/upload.php1,414 ▲114.25 ▲0.0696.66 ▼4.4743.40 ▼0.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • Zombie WordPress options detected upon uninstall: 7 options
    • fedex_small_web_hook_plan_requests
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/small-package-quotes-fedex-edition/logs/en-json-tree-view/en-jtv.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-fedex-edition/fdo/en-sbs.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-fedex-edition/order-details/rates/order-rates.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-fedex-edition/order-details/en-order-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'FedEx_Small_Curl_Request' not found in wp-content/plugins/small-package-quotes-fedex-edition/logs/en-logs.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-fedex-edition/product/en-product-detail.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-package-quotes-fedex-edition/order-details/en-order-export.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-fedex-edition/template/csv-export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/small-package-quotes-fedex-edition/product/en-common-product-detail.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

small-package-quotes-fedex-edition/small-package-quotes-fedex-edition.php 85% from 13 tests

The main PHP script in "Small Package Quotes - For Customers of FedEx" version 4.2.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version must match the one declared in readme.txt ("6.2" instead of "6.4")

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 plugin12,273 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP431,4211,5788,470
JavaScript65366742,551
CSS3208461,252

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 177)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity43.96
▷ Minimum class complexity1.00
▷ Maximum class complexity328.00
Average method complexity6.91
▷ Minimum method complexity1.00
▷ Maximum method complexity177.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods197
▷ Static methods21.02%
▷ Public methods197100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions61
▷ Named functions5895.08%
▷ Anonymous functions34.92%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/edit.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/edit.png3.09KB0.70KB▼ 77.43%
warehouse-dropship/wild/assets/images/delete.png3.49KB0.86KB▼ 75.41%
asset/delete.png3.49KB0.86KB▼ 75.41%