76% optinmonster

Code Review | Popup Builder by OptinMonster - WordPress Popups for Optins, Email Newsletters and Lead Generation

WordPress plugin Popup Builder by OptinMonster - WordPress Popups for Optins, Email Newsletters and Lead Generation scored 76% from 54 tests.

About plugin

  • Plugin page: optinmonster
  • Plugin version: 2.6.12
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Apr 26, 2015
  • Latest release: Mar 25, 2022
  • Number of updates: 287
  • Update frequency: every 8.8 days
  • Top authors: griffinjt (33.8%)jtsternberg (33.1%)thebrandonallen (13.24%)channeleaton (10.8%)dvinson (4.88%)

Code review

54 tests

User reviews

507 reviews

Install metrics

1,000,000+ active / 67,887,345 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲1.00MB] [CPU: ▼156.76ms] Passed 4 tests

Server-side resources used by Popup Builder by OptinMonster - WordPress Popups for Optins, Email Newsletters and Lead Generation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.5763.30 ▲6.75
Dashboard /wp-admin4.54 ▲1.1450.16 ▲13.55
Posts /wp-admin/edit.php4.75 ▲1.1154.79 ▲13.39
Add New Post /wp-admin/post-new.php8.31 ▲1.34651.32 ▼655.63
Media Library /wp-admin/upload.php4.47 ▲1.1738.09 ▲8.44
University /wp-admin/admin.php?page=optin-monster-university4.5136.19
Settings /wp-admin/admin.php?page=optin-monster-settings4.5142.03
Upgrade to Pro /wp-admin/admin.php?page=optin-monster-upgrade4.2632.20
Social Proof Widget /wp-admin/admin.php?page=optin-monster-trustpulse4.4638.67
OptinMonster /wp-admin/admin.php?page=optin-monster-api-settings4.2632.11
Templates /wp-admin/admin.php?page=optin-monster-templates4.5138.51
Personalization /wp-admin/admin.php?page=optin-monster-personalization4.5138.00
Integrations /wp-admin/admin.php?page=optin-monster-integrations4.5139.19
Dashboard /wp-admin/admin.php?page=optin-monster-dashboard4.5135.95
Subscribers /wp-admin/admin.php?page=optin-monster-monsterleads4.5146.68

Server storage [IO: ▲20.10MB] [DB: ▲0.13MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 298 new files
Database: no new tables, 4 new options
New WordPress options
optinmonster_upgrade_completed
omapi_review
widget_optin-monster-api
optin_monster_api

Browser metrics Passed 4 tests

A check of browser resources used by Popup Builder by OptinMonster - WordPress Popups for Optins, Email Newsletters and Lead Generation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,993 ▲27116.22 ▲0.586.28 ▲0.621.97 ▼1.09
Dashboard /wp-admin3,110 ▲2496.30 ▲0.14120.29 ▼19.18188.16 ▲27.75
Posts /wp-admin/edit.php2,825 ▲1343.30 ▲0.0668.10 ▲5.41151.20 ▲9.30
Add New Post /wp-admin/post-new.php1,777 ▲11617.51 ▼0.33464.57 ▲73.90150.09 ▼1.29
Media Library /wp-admin/upload.php1,871 ▲1735.61 ▲0.12140.89 ▼1.47197.28 ▲1.97
University /wp-admin/admin.php?page=optin-monster-university2,34812.20337.98165.24
Settings /wp-admin/admin.php?page=optin-monster-settings2,26912.23301.47224.41
Upgrade to Pro /wp-admin/admin.php?page=optin-monster-upgrade4023.7290.6260.77
Social Proof Widget /wp-admin/admin.php?page=optin-monster-trustpulse2,1692.7754.89169.97
OptinMonster /wp-admin/admin.php?page=optin-monster-api-settings2,76613.07145.20201.18
Templates /wp-admin/admin.php?page=optin-monster-templates3,39121.13152.18198.04
Personalization /wp-admin/admin.php?page=optin-monster-personalization2,35913.16145.97210.80
Integrations /wp-admin/admin.php?page=optin-monster-integrations2,87216.09148.40196.47
Dashboard /wp-admin/admin.php?page=optin-monster-dashboard2,69612.93145.98201.03
Subscribers /wp-admin/admin.php?page=optin-monster-monsterleads2,18812.18148.20144.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 3 options in the database
    • widget_optin-monster-api
    • omapi_review
    • optinmonster_upgrade_completed

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/optinmonster/views/shortcode-modal-css.php
    • > /wp-content/plugins/optinmonster/views/upgrade-link-css.php
    • > /wp-content/plugins/optinmonster/views/woocommerce-marketing-card-css.php
    • > /wp-content/plugins/optinmonster/views/archie-loading.php
    • > /wp-content/plugins/optinmonster/views/jiggle-css.php
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/optinmonster/views/woocommerce-marketing-card.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/optinmonster/OMAPI/Elementor/Widget.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/optinmonster/views/trustpulse-banner.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Button' not found in wp-content/plugins/optinmonster/OMAPI/Elementor/ButtonWidget.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/optinmonster/views/constantcontact.php:166
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/optinmonster/views/inline-campaign-shortcode-modal.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/optinmonster/views/not-connected-buttons.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/optinmonster/views/trustpulse-settings-page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/optinmonster/views/plugin-banner.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/optinmonster/views/coupon-metabox.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 73% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Select a Campaign type (popup, full screen, floating bar, slide-in, inline or Gamified)) image not found
You can look at the official readme.txt

optinmonster/optin-monster-wp-api.php 54% from 13 tests

The primary PHP file in "Popup Builder by OptinMonster - WordPress Popups for Optins, Email Newsletters and Lead Generation" version 2.6.12 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 175 characters long)
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.7.0" instead of "3.2.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("optinmonster.php" instead of "optin-monster-wp-api.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected13,431 lines of code in 212 files:
LanguageFilesBlank linesComment linesLines of code
PHP642,1896,1368,678
SVG82111,982
CSS2266221,102
JavaScript411926421,009
Markdown11420514
JSON200146

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity24.72
▷ Minimum class complexity1.00
▷ Maximum class complexity129.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes00.00%
▷ Concrete classes47100.00%
▷ Final classes00.00%
Methods477
▷ Static methods7816.35%
▷ Public methods43591.19%
▷ Protected methods408.39%
▷ Private methods20.42%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants1157.89%
▷ Class constants842.11%
▷ Public constants8100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
43 PNG files occupy 3.09MB with 0.68MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/about/plugin-rafflepress.png3.52KB2.82KB▼ 19.95%
vue/dist/img/convert-abandon.bbbb1867.png19.84KB20.41KB0.00%
assets/images/about/plugin-aioseo.png1.47KB1.55KB0.00%
assets/css/images/logo-om.png23.15KB8.65KB▼ 62.62%
vue/dist/img/templates-limit-exceeded.3dbb21ff.png815.68KB593.10KB▼ 27.29%