90% before-exit-popup

Code Review | Before Exit Popup

WordPress plugin Before Exit Popup scored 90% from 54 tests.

About plugin

  • Plugin page: before-exit-popup
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.5
  • WordPress version: 6.3.1
  • First release: May 1, 2018
  • Latest release: May 14, 2018
  • Number of updates: 14
  • Update frequency: every 1.2 days
  • Top authors: webgensis (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 723 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.03MB] [CPU: ▲0.48ms] Passed 4 tests

An overview of server-side resources used by Before Exit Popup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.03 ▲3.00
Dashboard /wp-admin3.34 ▲0.0344.03 ▼3.03
Posts /wp-admin/edit.php3.39 ▲0.0346.15 ▲3.27
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.70 ▲2.40
Media Library /wp-admin/upload.php3.26 ▲0.0335.44 ▼0.45
Exit Popup Settings /wp-admin/options-general.php?page=before-exit-popup/before-exit-popup.php3.2330.04

Server storage [IO: ▲0.07MB] [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: 13 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
widget_recent-posts
webgensis_exit_popup_relative_posts_limit
category_children
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
webgensis_exit_popup_selected_posts
webgensis_exit_popup_select_option

Browser metrics Passed 4 tests

A check of browser resources used by Before Exit Popup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.28 ▼0.944.78 ▲3.0241.68 ▼6.84
Dashboard /wp-admin2,214 ▲234.89 ▼0.01103.99 ▲1.3938.69 ▲1.64
Posts /wp-admin/edit.php2,097 ▲82.03 ▲0.0439.81 ▲1.2336.04 ▲2.99
Add New Post /wp-admin/post-new.php1,521 ▼1723.36 ▲0.23596.28 ▼94.5552.28 ▼3.86
Media Library /wp-admin/upload.php1,396 ▲84.21 ▲0.0196.01 ▼14.7841.36 ▼5.40
Exit Popup Settings /wp-admin/options-general.php?page=before-exit-popup/before-exit-popup.php8331.7224.8127.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 10 options in the database
    • can_compress_scripts
    • db_upgraded
    • webgensis_exit_popup_relative_posts_limit
    • webgensis_exit_popup_selected_posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • category_children
    • webgensis_exit_popup_select_option
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: related posts, popup, exit popup

before-exit-popup/before-exit-popup.php Passed 13 tests

The entry point to "Before Exit Popup" version 1.0 is a PHP file that has certain tags in its header comment area
60 characters long description:
Show relative posts before closing the browser tab in popup.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin329 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13350214
CSS10079
JavaScript20036

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 compressed PNG files occupy 0.03MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/x.png1.04KB1.25KB0.00%
inc/img/placeholder2.png16.08KB11.42KB▼ 28.99%
inc/admin/img/x.png1.04KB1.25KB0.00%
inc/admin/img/placeholder2.png16.08KB11.42KB▼ 28.99%