84% wp-exit-popups

Code Review | WP Exit Popups

WordPress plugin WP Exit Popups scored84%from 54 tests.

About plugin

  • Plugin page: wp-exit-popups
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Mar 20, 2020
  • Latest release: Jun 29, 2023
  • Number of updates: 27
  • Update frequency: every 44.6 days
  • Top authors: mikeyott (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,437 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.27MB] [CPU: ▼3.30ms] Passed 4 tests

An overview of server-side resources used by WP Exit Popups
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3840.84 ▲2.56
Dashboard /wp-admin3.58 ▲0.2348.68 ▼11.25
Posts /wp-admin/edit.php3.70 ▲0.3454.83 ▲8.84
Add New Post /wp-admin/post-new.php6.15 ▲0.2680.06 ▼7.67
Media Library /wp-admin/upload.php3.48 ▲0.2636.36 ▲3.16
Add Popup /wp-admin/post-new.php?post_type=wpepu_exit_popup3.5447.02
All Popups /wp-admin/edit.php?post_type=wpepu_exit_popup3.5542.31

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

WP Exit Popups: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,074 ▲31315.16 ▲0.504.76 ▲3.1538.25 ▼0.38
Dashboard /wp-admin2,371 ▲1906.10 ▲0.39101.06 ▲3.38100.78 ▲58.71
Posts /wp-admin/edit.php2,299 ▲1993.30 ▲1.2754.64 ▲14.3474.00 ▲34.83
Add New Post /wp-admin/post-new.php1,559 ▲2422.95 ▲4.84625.19 ▲13.94111.81 ▲34.21
Media Library /wp-admin/upload.php1,436 ▲394.05 ▼0.1582.75 ▼13.1376.27 ▲33.15
Add Popup /wp-admin/post-new.php?post_type=wpepu_exit_popup3,6065.07114.13109.72
All Popups /wp-admin/edit.php?post_type=wpepu_exit_popup1,2843.4552.0667.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-exit-popups/wp-exit-popups.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: intent, popup, exit

wp-exit-popups/wp-exit-popups.php 92% from 13 tests

The main PHP script in "WP Exit Popups" version 1.1.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 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
There were no executable files found in this plugin2,529 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP3301581,302
PO File2298310712
Sass19016455
JavaScript27046
SVG130013
CSS1011

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 135)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity95.50
▷ Minimum class complexity1.00
▷ Maximum class complexity190.00
Average method complexity28.00
▷ Minimum method complexity1.00
▷ Maximum method complexity135.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin