61% experience-builder

Code Review | Experience Builder

WordPress plugin Experience Builder scored61%from 54 tests.

About plugin

  • Plugin page: experience-builder
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Nov 18, 2016
  • Latest release: Oct 7, 2021
  • Number of updates: 26
  • Update frequency: every 68.5 days
  • Top authors: monoloop (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,382 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.61MB] [CPU: ▼34.57ms] Passed 4 tests

Server-side resources used by Experience Builder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3052.10 ▲8.19
Dashboard /wp-admin3.35 ▲0.0026.83 ▼36.24
Posts /wp-admin/edit.php3.35 ▼0.0129.09 ▼20.66
Add New Post /wp-admin/post-new.php3.35 ▼2.5427.42 ▼72.48
Media Library /wp-admin/upload.php3.35 ▲0.1228.98 ▼8.88
Reset password /wp-admin/admin.php?page=ml_resetpassword3.3528.57
Sign in /wp-admin/admin.php?page=ml_signin3.3526.50
Change account /wp-admin/admin.php?page=ml_confirm_change_account3.3528.20
Pages /wp-admin/admin.php?page=ml_pages3.3528.52
Audiences /wp-admin/admin.php?page=ml_audience3.3525.16
Please confirm /wp-admin/admin.php?page=ml_please_confirm3.3527.11
Reset password success /wp-admin/admin.php?page=ml_resetpassword_complete3.3526.87
Log out /wp-admin/admin.php?page=ml_logout3.3528.68
Placement Window /wp-admin/admin.php?page=ml_placementwindow3.3527.89
Trackers /wp-admin/admin.php?page=ml_trackers3.3525.22

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
ml_token
theysaidso_admin_options

Browser metrics Passed 4 tests

Experience Builder: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲6214.67 ▲0.251.83 ▼0.2340.89 ▼1.79
Dashboard /wp-admin2,227 ▲565.54 ▲0.0182.61 ▼12.6972.85 ▲28.38
Posts /wp-admin/edit.php2,144 ▲442.00 ▲0.0236.84 ▼0.4639.10 ▲3.27
Add New Post /wp-admin/post-new.php1,566 ▲3022.93 ▲0.07683.38 ▲59.5556.47 ▼1.60
Media Library /wp-admin/upload.php1,438 ▲384.18 ▲0.00100.36 ▼3.5478.33 ▲30.94
Reset password /wp-admin/admin.php?page=ml_resetpassword9092.0024.6027.19
Sign in /wp-admin/admin.php?page=ml_signin1,5482.3125.7836.32
Change account /wp-admin/admin.php?page=ml_confirm_change_account2,2253.2531.5235.10
Pages /wp-admin/admin.php?page=ml_pages2,2103.4432.6433.59
Audiences /wp-admin/admin.php?page=ml_audience2,2263.2531.3536.29
Please confirm /wp-admin/admin.php?page=ml_please_confirm8721.9924.7024.89
Reset password success /wp-admin/admin.php?page=ml_resetpassword_complete8611.9925.1823.66
Log out /wp-admin/admin.php?page=ml_logout2,2113.2529.6038.33
Placement Window /wp-admin/admin.php?page=ml_placementwindow2,2253.3130.7738.12
Trackers /wp-admin/admin.php?page=ml_trackers2,2313.2532.0938.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/experience-builder/includes/class-monoloop-settings.php+350
    Undefined variable: wp_version
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 23 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ml_trackers
    • > Notice in wp-content/plugins/experience-builder/includes/class-monoloop-settings.php+350
    Undefined variable: wp_version
  • 23 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ml_trackers
    • > Notice in wp-content/plugins/experience-builder/includes/class-monoloop-settings.php+223
    Undefined index: title
  • 23 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ml_trackers
    • > Notice in wp-content/plugins/experience-builder/includes/class-monoloop-settings.php+238
    Undefined index: label
    • > GET request to /wp-admin/admin.php?page=ml_resetpassword
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Auth::resetpassword() should not be called statically
    • > GET request to /wp-admin/admin.php?page=ml_resetpassword
    • > Notice in wp-content/plugins/experience-builder/includes/controllers/class-monoloop-controller-auth.php+406
    Undefined variable: error
    • > GET request to /wp-admin/admin.php?page=ml_resetpassword
    • > Notice in wp-content/plugins/experience-builder/includes/controllers/class-monoloop-controller-auth.php+416
    Undefined variable: username
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ml_trackers
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Auth::login() should not be called statically
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ml_trackers
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Auth::start() should not be called statically
    • > GET request to /wp-admin/admin.php?page=ml_confirm_change_account
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Auth::changeAccount() should not be called statically
    • > GET request to /wp-admin/admin.php?page=ml_pages
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Page::index() should not be called statically
    • > GET request to /wp-admin/admin.php?page=ml_audience
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Segment::index() should not be called statically
    • > GET request to /wp-admin/admin.php?page=ml_please_confirm
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Auth::pleaseConfirm() should not be called statically
    • > GET request to /wp-admin/admin.php?page=ml_please_confirm
    • > Notice in wp-content/plugins/experience-builder/includes/controllers/class-monoloop-controller-auth.php+594
    Undefined index: ml_firstname
    • > GET request to /wp-admin/admin.php?page=ml_please_confirm
    • > Notice in wp-content/plugins/experience-builder/includes/controllers/class-monoloop-controller-auth.php+594
    Undefined index: ml_lastname
    • > GET request to /wp-admin/admin.php?page=ml_resetpassword_complete
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Auth::resetpassword_successs() should not be called statically
    • > GET request to /wp-admin/admin.php?page=ml_resetpassword_complete
    • > Notice in wp-content/plugins/experience-builder/includes/controllers/class-monoloop-controller-auth.php+458
    Undefined index: ml_email
    • > GET request to /wp-admin/admin.php?page=ml_logout
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Auth::logout() should not be called statically
    • > GET request to /wp-admin/admin.php?page=ml_placementwindow
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Placement::view_placementwindow() should not be called statically
    • > GET request to /wp-admin/admin.php?page=ml_trackers
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Monoloop_Controller_Tracker::index() should not be called statically

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
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/experience-builder/views/link-to-signup.php
    • > /wp-content/plugins/experience-builder/views/page-edit-content.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: placementUrl in wp-content/plugins/experience-builder/views/page-edit-content.php on line 82
    • > PHP Notice
      Trying to get property 'placementWindowUrl' of non-object in wp-content/plugins/experience-builder/views/page-edit-content.php on line 54
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/experience-builder/views/page-edit-content.php on line 45
    • > PHP Notice
      Undefined variable: api in wp-content/plugins/experience-builder/views/page-edit-content.php on line 54
    • > PHP Notice
      Undefined variable: api in wp-content/plugins/experience-builder/views/page-edit-content.php on line 66
    • > PHP Notice
      Trying to get property 'placementWindowUrl' of non-object in wp-content/plugins/experience-builder/views/page-edit-content.php on line 66
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/experience-builder/views/page-edit-content.php on line 49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #12 (screenshot-12.png: Real time reporting of active Experiences.), #13 (screenshot-13.png: Real time reporting of active Goals.)
The official readme.txt is a good inspiration

experience-builder/monoloop.php 77% from 13 tests

The main PHP script in "Experience Builder" version 1.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("experience-builder.php" instead of "monoloop.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.6" instead of "3.0")
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)

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
Everything looks great! No dangerous files found in this plugin2,073 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP154292841,759
CSS1563289
JavaScript17425

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity17.18
▷ Minimum class complexity2.00
▷ Maximum class complexity72.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods57
▷ Static methods35.26%
▷ Public methods5596.49%
▷ Protected methods00.00%
▷ Private methods23.51%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 1.74MB with 1.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-8.png92.64KB37.97KB▼ 59.01%
assets/screenshot-2.png104.95KB43.79KB▼ 58.28%
assets/screenshot-11.png116.48KB40.27KB▼ 65.43%
assets/screenshot-1.png111.98KB50.71KB▼ 54.72%
assets/screenshot-3.png127.06KB53.31KB▼ 58.05%