79% wp-optin-wheel

Code Review | WP Optin Wheel - Gamified Optin Email Marketing Tool for WordPress and WooCommerce

WordPress plugin WP Optin Wheel - Gamified Optin Email Marketing Tool for WordPress and WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: wp-optin-wheel
  • Plugin version: 1.4.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 31, 2017
  • Latest release: Oct 19, 2023
  • Number of updates: 58
  • Update frequency: every 37.6 days
  • Top authors: maartenbelmans (81.03%)studiowombat (20.69%)

Code review

54 tests

User reviews

81 reviews

Install metrics

2,000+ active /96,744 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WP Optin Wheel - Gamified Optin Email Marketing Tool for WordPress and WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2643.47 ▲4.56
Dashboard /wp-admin3.72 ▲0.3847.25 ▼13.84
Posts /wp-admin/edit.php3.78 ▲0.4242.76 ▼1.98
Add New Post /wp-admin/post-new.php6.24 ▲0.3681.72 ▲1.15
Media Library /wp-admin/upload.php3.59 ▲0.3636.76 ▲5.67
WP Optin Wheel /wp-admin/options-general.php?page=wp-optin-wheel3.8443.97

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 114 new files
Database: 1 new table, 7 new options
New tables
wp_wof_lite_optins
New WordPress options
theysaidso_admin_options
widget_recent-posts
wof-lite-dev-version
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP Optin Wheel - Gamified Optin Email Marketing Tool for WordPress and WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲12413.81 ▼0.619.41 ▲7.5741.04 ▼2.18
Dashboard /wp-admin2,199 ▲295.50 ▼0.1881.85 ▼20.2637.07 ▼5.87
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0533.32 ▼5.8534.17 ▼1.55
Add New Post /wp-admin/post-new.php1,529 ▲323.28 ▲0.09662.81 ▼30.8653.56 ▼2.23
Media Library /wp-admin/upload.php1,404 ▲104.23 ▲0.1293.43 ▼7.8141.43 ▼4.25
WP Optin Wheel /wp-admin/options-general.php?page=wp-optin-wheel3,4279.18255.9596.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-optin-wheel/admin/views/sidebar-main.php
    • > /wp-content/plugins/wp-optin-wheel/admin/views/log.php
    • > /wp-content/plugins/wp-optin-wheel/admin/views/gdpr-settings.php
    • > /wp-content/plugins/wp-optin-wheel/core/views/fields/container-option.php
    • > /wp-content/plugins/wp-optin-wheel/admin/views/form-builder-lists.php
    • > /wp-content/plugins/wp-optin-wheel/core/views/fields/colorpicker.php
    • > /wp-content/plugins/wp-optin-wheel/admin/views/privacy-policy-suggestions.php
    • > /wp-content/plugins/wp-optin-wheel/core/views/widget_form.php
  • 74× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-optin-wheel/code/views/response-lost.php:6
    • > PHP Notice
      Trying to get property 'value' of non-object in wp-content/plugins/wp-optin-wheel/core/views/fields/datepicker.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'MABEL_WOF_LITE\\Core\\Common\\Managers\\Config_Manager' not found in wp-content/plugins/wp-optin-wheel/core/views/fields/help.php:9
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/wp-optin-wheel/core/views/fields/autocomplete.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-optin-wheel/core/views/fields/pro-option.php:6
    • > PHP Notice
      Trying to get property 'button_text' of non-object in wp-content/plugins/wp-optin-wheel/core/views/fields/container-option.php on line 10
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/wp-optin-wheel/core/views/fields/hidden.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'MABEL_WOF_LITE\\Core\\Models\\Option' not found in wp-content/plugins/wp-optin-wheel/core/models/class-mediaselector-option.php:5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-optin-wheel/core/views/widget_form.php on line 9
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/wp-optin-wheel/core/views/fields/container-option.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: fortune, gamification, upsell, wheel, optin

wp-optin-wheel/wp-optin-wheel.php Passed 13 tests

Analyzing the main PHP file in "WP Optin Wheel - Gamified Optin Email Marketing Tool for WordPress and WooCommerce" version 1.4.4
87 characters long description:
Gamified optin popup to grow your email list, with exit-intent. Woocommerce compatible.

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
Success! There were no dangerous files found in this plugin3,474 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PHP777673593,350
SVG20082
JavaScript20033
CSS9009

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.57
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods165
▷ Static methods4426.67%
▷ Public methods14789.09%
▷ Protected methods00.00%
▷ Private methods1810.91%
Functions13
▷ Named functions215.38%
▷ Anonymous functions1184.62%
Constants0
▷ Global constants00.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
20 compressed PNG files occupy 0.36MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/wheel-yellow.png37.72KB37.68KB0.11%
public/img/wheel-red.png37.69KB37.59KB0.26%
admin/img/wheel-yellow.png5.78KB5.95KB0.00%
admin/img/wheel-black-and-white.png5.34KB5.48KB0.00%
admin/img/wheel-orange.png5.86KB6.00KB0.00%