10% doorhub-sameday

Code Review | Doorhub Sameday Delivery

WordPress plugin Doorhub Sameday Delivery scored 10% from 54 tests.

About plugin

  • Plugin page: doorhub-sameday
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Aug 20, 2019
  • Latest release: Aug 20, 2019
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: doorhubdk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 463 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/doorhub-sameday/doorhub-sameday.php+48
    Undefined variable: charset_collat

Server metrics [RAM: ▼1.96MB] [CPU: ▼49.47ms] Passed 4 tests

An overview of server-side resources used by Doorhub Sameday Delivery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.48 ▼35.55
Dashboard /wp-admin2.05 ▼1.265.30 ▼44.20
Posts /wp-admin/edit.php2.05 ▼1.315.33 ▼40.88
Add New Post /wp-admin/post-new.php2.05 ▼3.846.92 ▼77.24
Media Library /wp-admin/upload.php2.05 ▼1.185.63 ▼25.94

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Doorhub Sameday Delivery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲13513.85 ▼0.566.36 ▲4.6151.35 ▲10.15
Dashboard /wp-admin2,227 ▲245.85 ▲0.0693.12 ▼5.1638.81 ▲0.16
Posts /wp-admin/edit.php2,110 ▲212.00 ▼0.0439.76 ▲6.0835.64 ▲1.75
Add New Post /wp-admin/post-new.php1,546 ▲3223.62 ▲5.93646.28 ▼53.6754.30 ▼11.07
Media Library /wp-admin/upload.php1,412 ▲214.18 ▼0.0496.42 ▼12.9145.14 ▼2.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax-script_sameday handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie tables were found after uninstall: 1 table
    • wp_doorhub_api_settings_sameday
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/doorhub-sameday/admin/admin_settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/doorhub-sameday/functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/doorhub-sameday/doorhub-sameday.php:15

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: ondemand, delivery, sameday, shipping, firstmile...

doorhub-sameday/doorhub-sameday.php Passed 13 tests

The primary PHP file in "Doorhub Sameday Delivery" version 1.0 is used by WordPress to initiate all plugin functionality
118 characters long description:
Allow your customers to choose someday delivery at checkout with Doorhub. A fast, reliable way to deliver your orders.

Code Analysis Passed 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 plugin926 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP3105125530
SVG100288
JavaScript22335104
CSS2092
Markdown1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin