10% product-pre-orders-for-woo

Code Review | Product Pre-Orders for WooCommerce

WordPress plugin Product Pre-Orders for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: product-pre-order...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2021
  • Latest release: Jul 15, 2023
  • Number of updates: 20
  • Update frequency: every 42.9 days
  • Top authors: dragonlord47 (70%)villatheme (25%)phamtruongtn (15%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /12,486 total downloads


Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/product-pre-orders-for-woo/admin/product.php+18
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.56MB] [CPU: ▼0.55ms] 75% from 4 tests

This is a short check of server-side resources used by Product Pre-Orders for WooCommerce
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 643.49ms on /wp-admin/admin.php?page=product-pre-orders-for-woo-extensions)
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5541.07 ▲3.35
Dashboard /wp-admin3.92 ▲0.6151.82 ▼0.14
Posts /wp-admin/edit.php3.97 ▲0.6147.83 ▲1.47
Add New Post /wp-admin/post-new.php6.44 ▲0.5587.70 ▼6.89
Media Library /wp-admin/upload.php3.78 ▲0.5543.78 ▲8.53
Extensions /wp-admin/admin.php?page=product-pre-orders-for-woo-extensions3.96643.49

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Pre-Orders for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲9614.24 ▼0.111.61 ▲0.0137.67 ▼2.72
Dashboard /wp-admin2,248 ▲705.58 ▼0.0481.19 ▼15.4342.25 ▲1.40
Posts /wp-admin/edit.php2,151 ▲511.95 ▼0.0735.08 ▼0.3838.03 ▲0.22
Add New Post /wp-admin/post-new.php1,574 ▲4818.43 ▼5.12601.95 ▼32.4568.37 ▲10.60
Media Library /wp-admin/upload.php1,453 ▲504.16 ▼0.0399.56 ▼0.0443.80 ▲1.11
Extensions /wp-admin/admin.php?page=product-pre-orders-for-woo-extensions1,7642.0528.3265.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • product-pre-orders-for-woo_start_use
    • widget_recent-comments
    • pre_order_setting_default
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 96% 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: wordpress, woocommerce pre-order, pre order, woo pre-order, pre-order...

product-pre-orders-for-woo/product-pre-orders-for-woo.php 92% from 13 tests

"Product Pre-Orders for WooCommerce" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0.0" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected12,341 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PO File16464205

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity62.00
▷ Minimum class complexity4.00
▷ Maximum class complexity162.00
Average method complexity6.93
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods11.39%
▷ Public methods6894.44%
▷ Protected methods22.78%
▷ Private methods22.78%
▷ Named functions150.00%
▷ Anonymous functions150.00%
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin