83% lp-express-shipping-method-for-woocommerce

Code Review | "LP Express" Shipping Method for WooCommerce

WordPress plugin "LP Express" Shipping Method for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: lp-express-shippi...
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Apr 20, 2021
  • Number of updates: 37
  • Update frequency: every 37.0 days
  • Top authors: zefy (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

800+ active /6,852 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by "LP Express" Shipping Method for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0051.48 ▲9.66
Dashboard /wp-admin3.31 ▲0.0052.10 ▼2.01
Posts /wp-admin/edit.php3.36 ▲0.0049.67 ▼5.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.27 ▼3.82
Media Library /wp-admin/upload.php3.23 ▲0.0043.78 ▲5.59

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for "LP Express" Shipping Method for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.24 ▼1.121.77 ▲0.0144.16 ▼8.49
Dashboard /wp-admin2,218 ▲154.85 ▼0.04118.51 ▲10.1842.59 ▲1.45
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0536.55 ▼1.1933.66 ▼5.89
Add New Post /wp-admin/post-new.php1,545 ▼423.25 ▲0.07651.54 ▲7.9361.08 ▲10.23
Media Library /wp-admin/upload.php1,403 ▲34.25 ▼0.16103.09 ▼7.4744.88 ▼3.89

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/lp-express-shipping-method-for-woocommerce/lp-express-shipping-method-for-woocommerce.php
    • > /wp-content/plugins/lp-express-shipping-method-for-woocommerce/includes/class-wc-lpexpress-terminals-shipping-method.php
    • > /wp-content/plugins/lp-express-shipping-method-for-woocommerce/woocommerce/order/lpexpress_terminals.php
    • > /wp-content/plugins/lp-express-shipping-method-for-woocommerce/woocommerce/checkout/lpexpress_terminals.php
    • > /wp-content/plugins/lp-express-shipping-method-for-woocommerce/woocommerce/order/admin_lpexpress_terminals.php
    • > /wp-content/plugins/lp-express-shipping-method-for-woocommerce/woocommerce/email/lpexpress_terminals.php
    • > /wp-content/plugins/lp-express-shipping-method-for-woocommerce/includes/class-wc-lpexpress-courier-shipping-method.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

lp-express-shipping-method-for-woocommerce/lp-express-shipping-method-for-woocommerce.php 85% from 13 tests

""LP Express" Shipping Method for WooCommerce" version 1.0.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected497 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7136299438
PO File119058
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity18.33
▷ Minimum class complexity4.00
▷ Maximum class complexity44.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2793.10%
▷ Protected methods26.90%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin