84% woo-jw-simple-localpickup-and-delivery

Code Review | woocommerce-jw-lpd

WordPress plugin woocommerce-jw-lpd scored84%from 54 tests.

About plugin

  • Plugin page: woo-jw-simple-loc...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jun 30, 2017
  • Latest release: Jun 30, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wrise (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.51ms] Passed 4 tests

An overview of server-side resources used by woocommerce-jw-lpd
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.17 ▼1.81
Dashboard /wp-admin3.32 ▼0.0348.49 ▼12.74
Posts /wp-admin/edit.php3.37 ▲0.0148.75 ▼4.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.75 ▼10.81
Media Library /wp-admin/upload.php3.24 ▲0.0136.65 ▼0.92
JW Simple Pickup & Deliver /wp-admin/admin.php?page=jw_simple_local_pickup_submenu_page3.2633.42

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by woocommerce-jw-lpd
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14913.70 ▼0.947.78 ▲5.6942.33 ▲0.50
Dashboard /wp-admin2,219 ▲164.87 ▲0.02124.89 ▲10.5542.66 ▼0.33
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0441.33 ▲0.8236.00 ▼2.52
Add New Post /wp-admin/post-new.php1,530 ▼123.27 ▲0.22666.59 ▼31.8954.13 ▲0.63
Media Library /wp-admin/upload.php1,398 ▼24.33 ▲0.0695.00 ▼6.3541.43 ▼6.64
JW Simple Pickup & Deliver /wp-admin/admin.php?page=jw_simple_local_pickup_submenu_page8331.6826.0124.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=jw_simple_local_pickup_submenu_page
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=jw_simple_local_pickup_submenu_page:194:80)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=jw_simple_local_pickup_submenu_page
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: "paypal.me/wrise"
The official readme.txt might help

woo-jw-simple-localpickup-and-delivery/woocommerce-jw-lpd.php 92% from 13 tests

"woocommerce-jw-lpd" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-jw-simple-localpickup-and-delivery.php" instead of "woocommerce-jw-lpd.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,492 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS235501,151
PHP66049341

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.61
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot/screenshot-2.png19.79KB9.63KB▼ 51.33%
assets/screenshot/screenshot-1.png47.13KB19.46KB▼ 58.70%