84% woo-postmates-integration

Code Review | WooCommerce Postmates Integration

WordPress plugin WooCommerce Postmates Integration scored84%from 54 tests.

About plugin

  • Plugin page: woo-postmates-int...
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Mar 13, 2017
  • Latest release: Mar 18, 2021
  • Number of updates: 21
  • Update frequency: every 69.6 days
  • Top authors: aglipanci (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,701 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▲0.91ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Postmates Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3942.20 ▲0.97
Dashboard /wp-admin3.68 ▲0.3848.28 ▼3.91
Posts /wp-admin/edit.php3.74 ▲0.3850.15 ▲2.98
Add New Post /wp-admin/post-new.php6.22 ▲0.3489.85 ▲4.04
Media Library /wp-admin/upload.php3.55 ▲0.3237.52 ▲3.58

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 133 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Postmates Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.22 ▼1.331.78 ▲0.1241.35 ▼3.39
Dashboard /wp-admin2,211 ▲235.85 ▲0.01107.32 ▲1.9240.51 ▼4.07
Posts /wp-admin/edit.php2,094 ▲52.02 ▼0.0040.47 ▼3.4135.27 ▼0.24
Add New Post /wp-admin/post-new.php1,530 ▲1123.20 ▼0.07658.72 ▼2.8147.50 ▼4.30
Media Library /wp-admin/upload.php1,393 ▲84.23 ▲0.0299.54 ▼2.3444.73 ▲0.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 49× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/woo-postmates-integration/vendor/guzzlehttp/promises/src/TaskQueue.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/woo-postmates-integration/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/woo-postmates-integration/vendor/guzzlehttp/promises/src/Coroutine.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/woo-postmates-integration/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/woo-postmates-integration/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/woo-postmates-integration/vendor/guzzlehttp/psr7/src/UploadedFile.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/woo-postmates-integration/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/woo-postmates-integration/vendor/guzzlehttp/promises/src/Promise.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/woo-postmates-integration/vendor/guzzlehttp/promises/src/RejectedPromise.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/woo-postmates-integration/vendor/guzzlehttp/promises/src/EachPromise.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: postmates shipping, postmates, woocommerce shipping, woocommerce, postmates-api

woo-postmates-integration/woocommerce-postmates.php 92% from 13 tests

The primary PHP file in "WooCommerce Postmates Integration" version 1.5.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-postmates-integration.php" instead of "woocommerce-postmates.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin12,502 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
PHP1041,9835,0638,770
Markdown1096103,201
JSON700463
YAML210043
XML10016
make1409

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity12.46
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces10
Interfaces14
Traits2
Classes74
▷ Abstract classes11.35%
▷ Concrete classes7398.65%
▷ Final classes79.59%
Methods685
▷ Static methods649.34%
▷ Public methods56983.07%
▷ Protected methods81.17%
▷ Private methods10815.77%
Functions143
▷ Named functions5538.46%
▷ Anonymous functions8861.54%
Constants55
▷ Global constants00.00%
▷ Class constants55100.00%
▷ Public constants55100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin