78% waitlist-woocommerce

Code Review | Waitlist Woocommerce ( Back in stock notifier )

WordPress plugin Waitlist Woocommerce ( Back in stock notifier ) scored78%from 54 tests.

About plugin

  • Plugin page: waitlist-woocommerce
  • Plugin version: 2.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 4, 2016
  • Latest release: Aug 24, 2023
  • Number of updates: 167
  • Update frequency: every 15.1 days
  • Top authors: xootix (100%)

Code review

54 tests

User reviews

94 reviews

Install metrics

5,000+ active /51,991 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Waitlist Woocommerce ( Back in stock notifier )
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.58 ▼6.10
Dashboard /wp-admin3.31 ▼0.0350.39 ▼12.76
Posts /wp-admin/edit.php3.36 ▲0.0151.48 ▲1.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.54 ▼13.48
Media Library /wp-admin/upload.php3.23 ▲0.0040.30 ▲3.13

Server storage [IO: ▲3.64MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/waitlist-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 117 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Waitlist Woocommerce ( Back in stock notifier )
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.65 ▼0.572.04 ▲0.3341.64 ▲0.82
Dashboard /wp-admin2,224 ▲214.82 ▼1.08107.95 ▲1.2841.56 ▼2.52
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0241.43 ▲3.4538.21 ▲2.60
Add New Post /wp-admin/post-new.php1,554 ▲923.32 ▲2.29669.33 ▼21.2958.84 ▼2.10
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.01100.89 ▼4.9944.67 ▼4.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/waitlist-woocommerce/includes/xoo-framework/admin/templates/global/setting-upload.php
    • > /wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/templates/scripts/field-display.php
    • > /wp-content/plugins/waitlist-woocommerce/admin/views/settings/pro.php
    • > /wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/templates/scripts/notice.php
    • > /wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/templates/scripts/field-settings.php
    • > /wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/templates/scripts/field-settings-container.php
    • > /wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/templates/xoo-aff-template-scripts.php
  • 90× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include(): Failed opening 'XOO_AFF_DIR/countries/countries.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/defaults/field-setting-options.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/defaults/field-types.php:120
    • > PHP Notice
      Undefined variable: sy_options in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/includes/templates/xoo-aff-inline-style.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/includes/templates/xoo-aff-inline-style.php on line 7
    • > PHP Warning
      include(XOO_AFF_DIR/countries/countries.php): failed to open stream: No such file or directory in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/defaults/field-settings.php on line 163
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/templates/xoo-aff-page-display.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/includes/templates/xoo-aff-inline-style.php on line 4
    • > PHP Warning
      Use of undefined constant XOO_AFF_DIR - assumed 'XOO_AFF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/defaults/field-settings.php on line 163
    • > PHP Warning
      include(XOO_AFF_DIR/admin/templates/scripts//notice.php): failed to open stream: No such file or directory in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/templates/xoo-aff-template-scripts.php on line 26
    • > PHP Warning
      include(XOO_AFF_DIR/countries/countries.php): failed to open stream: No such file or directory in wp-content/plugins/waitlist-woocommerce/xoo-form-fields-fw/admin/defaults/field-settings.php on line 132

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

waitlist-woocommerce/xoo-wl-main.php 92% from 13 tests

The principal PHP file in "Waitlist Woocommerce ( Back in stock notifier )" v. 2.5.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("waitlist-woocommerce.php" instead of "xoo-wl-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected26,255 lines of code in 98 files:
LanguageFilesBlank linesComment linesLines of code
SVG4009,566
PHP692,2614218,581
JavaScript114472135,195
CSS13323972,897
XML15016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity31.10
▷ Minimum class complexity2.00
▷ Maximum class complexity215.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods238
▷ Static methods93.78%
▷ Public methods23096.64%
▷ Protected methods31.26%
▷ Private methods52.10%
Functions22
▷ Named functions2090.91%
▷ Anonymous functions29.09%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected