77% wc-order-limit-lite

Code Review | Order Limit for WooCommerce

WordPress plugin Order Limit for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: wc-order-limit-lite
  • Plugin version: 0.0.9
  • PHP compatiblity: 6.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 2, 2020
  • Latest release: Aug 11, 2023
  • Number of updates: 43
  • Update frequency: every 25.0 days
  • Top authors: xfinitysoft (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /12,128 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

A check of server-side resources used by Order Limit for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.45 ▼2.03
Dashboard /wp-admin3.31 ▲0.0047.79 ▼1.22
Posts /wp-admin/edit.php3.36 ▲0.0044.08 ▼4.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.87 ▼14.97
Media Library /wp-admin/upload.php3.23 ▲0.0036.64 ▲6.53

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Order Limit for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.051.73 ▼0.2442.66 ▼2.87
Dashboard /wp-admin2,209 ▲214.85 ▲0.03106.47 ▼3.4939.09 ▼3.43
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0233.96 ▼8.6137.38 ▲0.04
Add New Post /wp-admin/post-new.php1,536 ▲1323.26 ▲0.06651.20 ▲29.8057.12 ▲2.03
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.1496.07 ▼5.1540.94 ▼3.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wc-order-limit-lite/includes/admin/views/view-wcol-support-tab.php
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wc-order-limit-lite/includes/admin/views/ajax-templates/template-products-rule-row.php:5
    • > PHP Notice
      Undefined variable: tab1 in wp-content/plugins/wc-order-limit-lite/includes/admin/views/view-wcol-support-tab.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wc-order-limit-lite/includes/admin/views/view-wcol-category-rules.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wc-order-limit-lite/includes/admin/views/view-wcol-product-rules.php:3
    • > PHP Notice
      Undefined variable: tab1 in wp-content/plugins/wc-order-limit-lite/includes/admin/views/view-wcol-support-tab.php on line 92
    • > PHP Notice
      Undefined variable: tab1 in wp-content/plugins/wc-order-limit-lite/includes/admin/views/view-wcol-support-tab.php on line 48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wc-order-limit-lite/includes/admin/views/view-wcol-order-total-rules.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wc-order-limit-lite/includes/admin/views/ajax-templates/template-single-product-cat-rule-row.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wc-order-limit-lite/includes/admin/views/ajax-templates/template-single-product-rule-row.php:2
    • > PHP Notice
      Undefined variable: tab1 in wp-content/plugins/wc-order-limit-lite/includes/admin/views/view-wcol-support-tab.php on line 136

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: orders, vender, products, woocommerce, limits...

wc-order-limit-lite/order-limit-lite-for-woocommerce.php 69% from 13 tests

The principal PHP file in "Order Limit for WooCommerce" v. 0.0.9 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 171 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.5" instead of "4.4.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-order-limit-lite.php" instead of "order-limit-lite-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,777 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP131771372,339
CSS2315569
JavaScript2314559
PO File1117229310

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity111.00
▷ Minimum class complexity2.00
▷ Maximum class complexity264.00
Average method complexity8.33
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin