90% exit-notifier

Code Review | Exit Notifier

WordPress plugin Exit Notifier scored90%from 54 tests.

About plugin

  • Plugin page: exit-notifier
  • Plugin version: 1.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Aug 16, 2015
  • Latest release: Mar 10, 2021
  • Number of updates: 108
  • Update frequency: every 18.8 days
  • Top authors: cvs@cvstech.com (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

2,000+ active /32,825 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.33ms] Passed 4 tests

Analyzing server-side resources used by Exit Notifier
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0848.98 ▲6.48
Dashboard /wp-admin3.36 ▲0.0644.91 ▼4.78
Posts /wp-admin/edit.php3.41 ▲0.0545.70 ▲0.88
Add New Post /wp-admin/post-new.php5.96 ▲0.0793.10 ▲0.48
Media Library /wp-admin/upload.php3.28 ▲0.0536.61 ▲2.08
Exit Notifier /wp-admin/options-general.php?page=exit_notifier_settings3.2937.18

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
exit_notifier_version
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Exit Notifier
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲21213.79 ▼0.5115.71 ▲14.0242.25 ▼1.57
Dashboard /wp-admin2,214 ▲235.88 ▲0.97100.39 ▼5.1941.45 ▼4.71
Posts /wp-admin/edit.php2,100 ▲112.04 ▼0.0038.52 ▲1.8030.99 ▼2.61
Add New Post /wp-admin/post-new.php1,544 ▲2123.12 ▼0.16635.01 ▼22.8652.66 ▼10.17
Media Library /wp-admin/upload.php1,399 ▲144.24 ▲0.0593.30 ▼6.2242.04 ▲0.28
Exit Notifier /wp-admin/options-general.php?page=exit_notifier_settings1,1193.1837.7028.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • exit_notifier_version
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

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
5 plugin tags: credit union, external link, speed bump, pop up, exit link

exit-notifier/exit-notifier.php Passed 13 tests

The main PHP file in "Exit Notifier" ver. 1.9.1 adds more information about the plugin and also serves as the entry point for this plugin
80 characters long description:
Pops up a notice when someone clicks a link that takes them away from your site.

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
Everything looks great! No dangerous files found in this plugin1,721 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP82184421,174
JavaScript52532515
Markdown112017
CSS30015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity21.00
▷ Minimum class complexity5.00
▷ Maximum class complexity61.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods40
▷ Static methods37.50%
▷ Public methods3895.00%
▷ Protected methods00.00%
▷ Private methods25.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
external-link.png0.26KB0.14KB▼ 48.33%