83% pre-orders-for-woocommerce

Code Review | Pre-Orders for WooCommerce

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

About plugin

  • Plugin page: pre-orders-for-wo...
  • Plugin version: 1.2.14
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 10, 2020
  • Latest release: Oct 4, 2023
  • Number of updates: 79
  • Update frequency: every 16.2 days
  • Top authors: niloybrightvessel (74.68%)brightvesseldev (13.92%)milardovich (12.66%)im_niloy (2.53%)

Code review

54 tests

User reviews

39 reviews

Install metrics

6,000+ active /96,756 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.34MB] [CPU: ▲1.81ms] Passed 4 tests

This is a short check of server-side resources used by Pre-Orders for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3738.29 ▲1.86
Dashboard /wp-admin3.67 ▲0.3647.39 ▼0.74
Posts /wp-admin/edit.php3.72 ▲0.3647.81 ▼0.00
Add New Post /wp-admin/post-new.php6.21 ▲0.3299.77 ▲8.25
Media Library /wp-admin/upload.php3.53 ▲0.3040.70 ▲6.11

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
rdn_fetch_1529d7bd

Browser metrics Passed 4 tests

Checking browser requirements for Pre-Orders for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.29 ▼0.241.51 ▼0.1241.18 ▼0.80
Dashboard /wp-admin2,202 ▲255.53 ▼0.1681.76 ▼5.9039.32 ▼4.85
Posts /wp-admin/edit.php2,111 ▲112.16 ▲0.1535.82 ▲1.1934.57 ▼1.74
Add New Post /wp-admin/post-new.php1,538 ▲123.28 ▲5.10594.93 ▼6.0346.16 ▼18.10
Media Library /wp-admin/upload.php1,407 ▲74.16 ▼0.0293.58 ▼14.2143.04 ▼3.60

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • rdn_fetch_1529d7bd
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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 | 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/pre-orders-for-woocommerce/elementor/widgets/preorder-products.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: The official readme.txt might help

pre-orders-for-woocommerce/main.php 77% from 13 tests

The main file in "Pre-Orders for WooCommerce" v. 1.2.14 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pre-orders-for-woocommerce.php" instead of "main.php")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.2" instead of "7.2.0")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin5,111 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,1452,2454,405
JSON520259
CSS2185222
XML2711148
JavaScript4201477

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.76
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes26.90%
Methods305
▷ Static methods299.51%
▷ Public methods24279.34%
▷ Protected methods237.54%
▷ Private methods4013.11%
Functions16
▷ Named functions318.75%
▷ Anonymous functions1381.25%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/img/bp-logo-icon.png1.09KB0.87KB▼ 20.45%
media/img/BP-50-off-banner.png39.92KB15.00KB▼ 62.43%
media/img/bp-logo.png4.99KB2.68KB▼ 46.35%