72% woo-local-pickup-pro

Code Review | Local Pickup Pro for WooCommerce

WordPress plugin Local Pickup Pro for WooCommerce scored72%from 54 tests.

About plugin

  • Plugin page: woo-local-pickup-pro
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Nov 4, 2019
  • Latest release: Apr 1, 2021
  • Number of updates: 15
  • Update frequency: every 35.5 days
  • Top authors: midriff (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,488 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼10.87ms] Passed 4 tests

Server-side resources used by Local Pickup Pro for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0829.64 ▼8.56
Dashboard /wp-admin3.44 ▲0.0947.18 ▼14.36
Posts /wp-admin/edit.php3.55 ▲0.2042.66 ▼6.74
Add New Post /wp-admin/post-new.php6.02 ▲0.1487.98 ▼13.80
Media Library /wp-admin/upload.php3.36 ▲0.1336.87 ▲2.69
All Locations /wp-admin/edit.php?post_type=local-pickup-pro3.4043.30
Settings /wp-admin/admin.php?page=wc-settings&tab=shipping§ion=wpll-shipping-method3.1326.88
Add New /wp-admin/post-new.php?post_type=local-pickup-pro3.3739.34

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
recovery_mode_email_last_sent
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Local Pickup Pro for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,492 ▼25414.31 ▼0.060.48 ▼1.1120.74 ▼19.58
Dashboard /wp-admin2,233 ▲555.65 ▼0.0485.36 ▼21.7138.00 ▲1.11
Posts /wp-admin/edit.php2,138 ▲352.01 ▼0.0035.29 ▼1.4132.05 ▼13.38
Add New Post /wp-admin/post-new.php1,559 ▲3320.96 ▼2.07589.76 ▼29.8882.72 ▲3.14
Media Library /wp-admin/upload.php1,441 ▲414.18 ▼0.0499.08 ▼2.9248.58 ▲4.05
All Locations /wp-admin/edit.php?post_type=local-pickup-pro1,1182.0033.1732.29
Settings /wp-admin/admin.php?page=wc-settings&tab=shipping§ion=wpll-shipping-method280.420.073.85
Add New /wp-admin/post-new.php?post_type=local-pickup-pro1,3451.517.5632.72

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=local-pickup-pro
    • > Error in wp-content/plugins/woo-local-pickup-pro/includes/wlpp-post-type.php+124
    Uncaught Error: Call to undefined function get_woocommerce_currency_symbol() in wp-content/plugins/woo-local-pickup-pro/includes/wlpp-post-type.php:124
    Stack trace:
    #0 wp-admin/includes/template.php(1443): wlpp_metabox_details_content()
    #1 wp-admin/edit-form-advanced.php(688): do_meta_boxes()
    #2 wp-admin/post-new.php(75): require('/var/www/wordpr...')
    #3 {main}
    thrown

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
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-local-pickup-pro/includes/wlpp-checkout.php:114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-local-pickup-pro/includes/wlpp-admin.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-local-pickup-pro/includes/wlpp-ship-method.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-local-pickup-pro/includes/wlpp-post-type.php:36

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=wc-settings&tab=shipping§ion=wpll-shipping-method
    • > Network (severe)
    wp-admin/admin.php?page=wc-settings&tab=shipping&section=wpll-shipping-method - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% 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
8 plugin tags: store pickup, local pickup, woocoomerce local pickup, e-commerce, ecommerce...

woo-local-pickup-pro/install.php 77% from 13 tests

The main PHP file in "Local Pickup Pro for WooCommerce" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 172 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-local-pickup-pro.php" instead of "install.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,816 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS242481,225
PHP65754591

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
includes/assets/css/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
includes/assets/css/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
includes/assets/css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
includes/assets/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%