84% webshipper-automated-shipping

Code Review | Webshipper - Automated Shipping

WordPress plugin Webshipper - Automated Shipping scored 84% from 54 tests.

About plugin

  • Plugin page: webshipper-automa...
  • Plugin version: 1.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: Dec 3, 2019
  • Latest release: Aug 16, 2023
  • Number of updates: 56
  • Update frequency: every 26.5 days
  • Top authors: webshipper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 7,948 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.90ms] Passed 4 tests

An overview of server-side resources used by Webshipper - Automated Shipping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.86 ▼3.93
Dashboard /wp-admin3.38 ▲0.0852.97 ▼0.72
Posts /wp-admin/edit.php3.43 ▲0.0750.39 ▲2.51
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.91 ▼26.57
Media Library /wp-admin/upload.php3.30 ▲0.0734.97 ▼0.38

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 132 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Webshipper - Automated Shipping: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.77 ▲0.501.72 ▼0.1140.90 ▲0.10
Dashboard /wp-admin2,206 ▲186.04 ▲0.93108.62 ▼2.5135.57 ▼5.06
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0540.43 ▲0.7637.48 ▲5.69
Add New Post /wp-admin/post-new.php1,514 ▼2517.70 ▼5.58695.74 ▲17.3759.90 ▲6.54
Media Library /wp-admin/upload.php1,388 ▼04.29 ▲0.08103.16 ▲1.3442.97 ▼2.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 43× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/promises/src/CancellationException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/promises/src/EachPromise.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/psr7/src/LimitStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/promises/src/TaskQueue.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/webshipper-automated-shipping/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

webshipper-automated-shipping/webshipper-automated-shipping.php Passed 13 tests

The principal PHP file in "Webshipper - Automated Shipping" v. 1.5.5 is loaded by WordPress automatically on each request
55 characters long description:
Automated shipping for WooCommerce (Webshipper v2 only)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin13,120 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
PHP971,9124,9589,292
Markdown991703,106
CSS2581454
JSON600155
JavaScript4203104
make1409

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity13.90
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces8
Interfaces14
Traits2
Classes67
▷ Abstract classes00.00%
▷ Concrete classes67100.00%
▷ Final classes710.45%
Methods653
▷ Static methods6710.26%
▷ Public methods53481.78%
▷ Protected methods131.99%
▷ Private methods10616.23%
Functions159
▷ Named functions6742.14%
▷ Anonymous functions9257.86%
Constants49
▷ Global constants00.00%
▷ Class constants49100.00%
▷ Public constants49100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icons/gls.png14.61KB6.94KB▼ 52.48%
img/icons/postnord.png7.07KB4.34KB▼ 38.62%
img/icons/ups.png10.55KB6.45KB▼ 38.88%
img/icons/dao.png7.56KB3.87KB▼ 48.82%
img/icons/bring.png4.45KB2.46KB▼ 44.79%