84% limit-orders

Code Review | Limit Orders for WooCommerce

WordPress plugin Limit Orders for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: limit-orders
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2020
  • Latest release: Nov 22, 2022
  • Number of updates: 14
  • Update frequency: every 69.4 days
  • Top authors: nexcess (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 5,694 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.73ms] Passed 4 tests

Server-side resources used by Limit Orders for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.77 ▼3.54
Dashboard /wp-admin3.31 ▲0.0145.63 ▼2.50
Posts /wp-admin/edit.php3.36 ▲0.0149.06 ▼0.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.24 ▼8.12
Media Library /wp-admin/upload.php3.23 ▲0.0137.75 ▲4.13

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Limit Orders for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.76 ▲0.391.80 ▼0.3740.27 ▼7.96
Dashboard /wp-admin2,209 ▲185.86 ▲0.99100.89 ▼3.5238.89 ▼8.20
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0241.10 ▲0.5536.07 ▼2.15
Add New Post /wp-admin/post-new.php1,533 ▲323.71 ▲5.53599.56 ▼41.2657.42 ▼17.44
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0899.23 ▼0.7141.87 ▼0.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\LimitOrders\\Views\\esc_html_e() in wp-content/plugins/limit-orders/src/Views/SystemStatusReport.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/limit-orders/src/Settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\LimitOrders\\add_action() in wp-content/plugins/limit-orders/limit-orders.php:47

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: throttle, limits, woocommerce, ordering

limit-orders/limit-orders.php 92% from 13 tests

"Limit Orders for WooCommerce" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

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
Everything looks great! No dangerous files found in this plugin472 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7125330472

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.20
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods3085.71%
▷ Protected methods514.29%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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