83% delivery-mail-boxes-etc-for-woocommerce

Code Review | Delivery Mail Boxes Etc. for WooCommerce

WordPress plugin Delivery Mail Boxes Etc. for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: delivery-mail-box...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.4
  • WordPress version: 6.3.1
  • First release: Jan 1, 2019
  • Latest release: Apr 11, 2020
  • Number of updates: 12
  • Update frequency: every 39.0 days
  • Top authors: mberussia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Delivery Mail Boxes Etc. for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0733.80 ▼11.20
Dashboard /wp-admin3.37 ▲0.0745.76 ▼2.71
Posts /wp-admin/edit.php3.48 ▲0.1347.26 ▼1.40
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.44 ▼0.73
Media Library /wp-admin/upload.php3.29 ▲0.0634.36 ▼2.71

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 122 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Delivery Mail Boxes Etc. for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.24 ▼1.145.20 ▲2.8738.74 ▼6.76
Dashboard /wp-admin2,203 ▲185.83 ▼0.0595.07 ▼32.2137.44 ▼11.26
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0133.45 ▼4.5836.29 ▼1.29
Add New Post /wp-admin/post-new.php1,533 ▲1423.22 ▼0.07668.89 ▼19.1259.84 ▲4.86
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0598.28 ▼7.2441.15 ▼1.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 43× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/guzzlehttp/psr7/src/CachingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/guzzlehttp/psr7/src/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/delivery-mail-boxes-etc-for-woocommerce/vendor/ralouphie/getallheaders/tests/GetAllHeadersTest.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

delivery-mail-boxes-etc-for-woocommerce/mbelab.php 77% from 13 tests

"Delivery Mail Boxes Etc. for WooCommerce" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.0.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("delivery-mail-boxes-etc-for-woocommerce.php" instead of "mbelab.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 160 characters long)

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
There were no executable files found in this plugin12,271 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP941,7724,7768,582
Markdown1099503,193
JSON600455
XML14018
YAML14014
make1409

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity12.98
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces8
Interfaces14
Traits2
Classes71
▷ Abstract classes00.00%
▷ Concrete classes71100.00%
▷ Final classes811.27%
Methods652
▷ Static methods6810.43%
▷ Public methods53682.21%
▷ Protected methods40.61%
▷ Private methods11217.18%
Functions145
▷ Named functions5940.69%
▷ Anonymous functions8659.31%
Constants50
▷ Global constants00.00%
▷ Class constants50100.00%
▷ Public constants50100.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
There were not PNG files found in your plugin