93% advanced-local-pickup-for-woocommerce

Code Review | Advanced Local Pickup for WooCommerce

WordPress plugin Advanced Local Pickup for WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: advanced-local-pi...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.9.2
  • First release: Apr 21, 2020
  • Latest release: Mar 17, 2022
  • Number of updates: 62
  • Update frequency: every 11.2 days
  • Top authors: zorem (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

4,000+ active / 50,782 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼295.41ms] Passed 4 tests

Analyzing server-side resources used by Advanced Local Pickup for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0164.71 ▲6.90
Dashboard /wp-admin3.41 ▲0.0136.90 ▲0.56
Posts /wp-admin/edit.php3.65 ▲0.0139.71 ▼3.11
Add New Post /wp-admin/post-new.php6.88 ▼0.0999.96 ▼1,182.56
Media Library /wp-admin/upload.php3.30 ▲0.0030.75 ▲3.46

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 69 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Local Pickup for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,810 ▲5616.01 ▲0.216.11 ▼0.742.55 ▼0.23
Dashboard /wp-admin2,903 ▲426.14 ▼0.04118.88 ▼17.19162.37 ▲2.23
Posts /wp-admin/edit.php2,672 ▼223.25 ▲0.0265.33 ▼2.95138.16 ▼9.22
Add New Post /wp-admin/post-new.php1,767 ▲922.10 ▲0.74428.90 ▼38.19159.72 ▼0.09
Media Library /wp-admin/upload.php1,716 ▲155.56 ▼0.04145.57 ▲0.39192.45 ▲10.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_local_pickup() in wp-content/plugins/advanced-local-pickup-for-woocommerce/templates/myaccount/pickup-instruction.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_local_pickup() in wp-content/plugins/advanced-local-pickup-for-woocommerce/include/views/wclp_pickup_location_instruction_preview.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/advanced-local-pickup-for-woocommerce/include/views/wclp_addon_tab.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_local_pickup() in wp-content/plugins/advanced-local-pickup-for-woocommerce/templates/emails/plain/pickup-instruction.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_local_pickup() in wp-content/plugins/advanced-local-pickup-for-woocommerce/include/views/wclp-edit-location-form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_local_pickup() in wp-content/plugins/advanced-local-pickup-for-woocommerce/templates/emails/pickup-instruction.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advanced-local-pickup-for-woocommerce/include/views/wclp_setting_tab.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_local_pickup() in wp-content/plugins/advanced-local-pickup-for-woocommerce/include/views/wclp_locations_tab.php:2

User-side errors Passed 1 test

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


Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt might help

advanced-local-pickup-for-woocommerce/woo-advanced-local-pickup.php 77% from 13 tests

"Advanced Local Pickup for WooCommerce" version 1.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 145 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-local-pickup-for-woocommerce.php" instead of "woo-advanced-local-pickup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin10,411 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PO File76028961,594

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity76.43
▷ Minimum class complexity5.00
▷ Maximum class complexity306.00
Average method complexity6.62
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods77.45%
▷ Public methods9196.81%
▷ Protected methods00.00%
▷ Private methods33.19%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
13 PNG files occupy 0.20MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/trackship-logo.png1.23KB0.70KB▼ 43.49%
assets/images/smswoo-icon.png23.49KB3.63KB▼ 84.57%
assets/images/sre-icon.png18.92KB2.65KB▼ 85.98%
assets/images/picked_up_icon.png0.72KB0.42KB▼ 41.27%
assets/images/alp-customizer-icon.png26.99KB3.52KB▼ 86.96%