83% wpk-delivery-manager-for-woocommerce

Code Review | WPK Delivery Manager for WooCommerce

WordPress plugin WPK Delivery Manager for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wpk-delivery-mana...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.3-6.2
  • WordPress version: 6.3.1
  • First release: Mar 15, 2023
  • Latest release: May 25, 2023
  • Number of updates: 8
  • Update frequency: every 8.9 days
  • Top authors: wpkishan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.43ms] Passed 4 tests

This is a short check of server-side resources used by WPK Delivery Manager for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.24 ▼1.35
Dashboard /wp-admin3.31 ▲0.0157.61 ▲4.72
Posts /wp-admin/edit.php3.36 ▲0.0046.53 ▼4.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.83 ▼7.18
Media Library /wp-admin/upload.php3.23 ▲0.0035.67 ▼0.35

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WPK Delivery Manager for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.23 ▼1.165.02 ▲3.3543.62 ▼9.61
Dashboard /wp-admin2,212 ▲204.87 ▼0.09108.47 ▼14.7438.54 ▼3.39
Posts /wp-admin/edit.php2,098 ▲62.02 ▲0.0037.02 ▼7.1533.20 ▼5.12
Add New Post /wp-admin/post-new.php1,539 ▲1123.08 ▼0.25617.46 ▼107.8150.11 ▼5.06
Media Library /wp-admin/upload.php1,394 ▲64.26 ▲0.0399.13 ▼13.2542.24 ▼4.19

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wpk-delivery-manager-for-woocommerce/wpk-wcdm-init.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpk-delivery-manager-for-woocommerce/include/class-wpk-wcdm-admin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpk-delivery-manager-for-woocommerce/include/class-wpk-wcdm-frontend.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

wpk-delivery-manager-for-woocommerce/wpk-wcdm-init.php 85% from 13 tests

The main PHP file in "WPK Delivery Manager for WooCommerce" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpk-delivery-manager-for-woocommerce.php" instead of "wpk-wcdm-init.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 315 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
Success! There were no dangerous files found in this plugin246 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP35314206
JavaScript26032
CSS2004
SVG1004

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.29
Average class complexity7.00
▷ Minimum class complexity3.00
▷ Maximum class complexity11.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods422.22%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_444444_256x240.png6.97KB4.18KB▼ 40.04%