83% exit-intent-popups-by-optimonk

Code Review | OptiMonk: Popups, Personalization & A/B Testing

WordPress plugin OptiMonk: Popups, Personalization & A/B Testing scored83%from 54 tests.

About plugin

  • Plugin page: exit-intent-popup...
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2015
  • Latest release: Jul 20, 2023
  • Number of updates: 139
  • Update frequency: every 21.8 days
  • Top authors: OptiMonk (100%)

Code review

54 tests

User reviews

85 reviews

Install metrics

3,000+ active /60,203 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼8.46ms] Passed 4 tests

This is a short check of server-side resources used by OptiMonk: Popups, Personalization & A/B Testing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.14 ▼0.30
Dashboard /wp-admin3.34 ▲0.0352.51 ▼0.78
Posts /wp-admin/edit.php3.39 ▲0.0350.37 ▼12.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.97 ▼19.98
Media Library /wp-admin/upload.php3.26 ▲0.0340.78 ▲0.96
OptiMonk /wp-admin/themes.php?page=optimonk3.2633.98

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
optimonk_notice

Browser metrics Passed 4 tests

OptiMonk: Popups, Personalization & A/B Testing: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6913.22 ▼1.165.90 ▲4.1444.97 ▲1.11
Dashboard /wp-admin2,233 ▲304.88 ▼1.02118.56 ▲12.2541.13 ▼9.73
Posts /wp-admin/edit.php2,115 ▲152.07 ▲0.0635.89 ▼7.5433.73 ▼6.39
Add New Post /wp-admin/post-new.php1,555 ▲2423.01 ▼0.02683.34 ▲88.2149.11 ▼1.75
Media Library /wp-admin/upload.php1,415 ▲154.19 ▼0.02113.14 ▲5.2246.74 ▲1.87
OptiMonk /wp-admin/themes.php?page=optimonk1,0251.9023.3530.38

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: registerText in wp-content/plugins/exit-intent-popups-by-optimonk/template/settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/exit-intent-popups-by-optimonk/template/settings.php:3
    • > PHP Notice
      Undefined variable: pluginDirUrl in wp-content/plugins/exit-intent-popups-by-optimonk/template/settings.php on line 1
    • > PHP Notice
      Undefined variable: domain in wp-content/plugins/exit-intent-popups-by-optimonk/template/settings.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% 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 your attention:
  • Tags: There are too many tags (42 tag instead of maximum 10)
The official readme.txt is a good inspiration

exit-intent-popups-by-optimonk/optimonk.php 85% from 13 tests

This is the main PHP file of "OptiMonk: Popups, Personalization & A/B Testing" version 2.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("exit-intent-popups-by-optimonk.php" instead of "optimonk.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,170 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP612796710
CSS1340198
PO File11015181
JavaScript118081

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.75
▷ Minimum class complexity6.00
▷ Maximum class complexity41.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods47
▷ Static methods1531.91%
▷ Public methods2859.57%
▷ Protected methods1838.30%
▷ Private methods12.13%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/logo.png11.35KB3.16KB▼ 72.19%
assets/insert_code_hu.png53.85KB19.32KB▼ 64.11%
assets/insert_code_en.png45.42KB16.05KB▼ 64.67%