84% woocommerce-loyal-customer

Code Review | WooCommerce Loyal Customers

WordPress plugin WooCommerce Loyal Customers scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-loyal...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-5.9.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2014
  • Latest release: Apr 26, 2022
  • Number of updates: 36
  • Update frequency: every 78.9 days
  • Top authors: codenterprise (66.67%)therightsw (36.11%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /6,110 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

A check of server-side resources used by WooCommerce Loyal Customers
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0031.53 ▼5.37
Dashboard /wp-admin3.31 ▲0.0040.15 ▼10.24
Posts /wp-admin/edit.php3.36 ▲0.0046.27 ▼1.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.64 ▼25.29
Media Library /wp-admin/upload.php3.23 ▲0.0030.79 ▼4.82

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Loyal Customers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.36 ▼0.261.60 ▲0.1335.56 ▼2.82
Dashboard /wp-admin2,195 ▲155.58 ▼0.0995.07 ▼0.1641.45 ▼5.04
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0138.72 ▼1.0335.75 ▼0.98
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▲0.04653.60 ▲2.0451.94 ▼12.56
Media Library /wp-admin/upload.php1,400 ▲64.17 ▼0.0591.48 ▼7.9340.46 ▼1.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-loyal-customer/customer-oder-detail.php:26
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-loyal-customer/admin/customer.php on line 5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-loyal-customer/admin/customer.php on line 5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-loyal-customer/admin/customer.php on line 5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
3 plugin tags: woocommerce order, woocommerce loyal customers, order count

woocommerce-loyal-customer/customer-oder-detail.php 85% from 13 tests

The primary PHP file in "WooCommerce Loyal Customers" version 2.3 is used by WordPress to initiate all plugin functionality
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 ("woocommerce-loyal-customer.php" instead of "customer-oder-detail.php")
  • Description: The description should be shorter than 140 characters (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin391 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25855349
JavaScript114542

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.50
▷ Minimum class complexity9.00
▷ Maximum class complexity32.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin