90% popup-zen

Code Review | Popup Zen - Small, Simple, Lightweight Email Optin

WordPress plugin Popup Zen - Small, Simple, Lightweight Email Optin scored90%from 54 tests.

About plugin

  • Plugin page: popup-zen
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.1
  • WordPress version: 6.3.1
  • First release: Mar 13, 2019
  • Latest release: May 30, 2019
  • Number of updates: 6
  • Update frequency: every 13.2 days
  • Top authors: scottopolis (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

30+ active /1,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.29MB] [CPU: ▼4.24ms] Passed 4 tests

Server-side resources used by Popup Zen - Small, Simple, Lightweight Email Optin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1545.27 ▲4.99
Dashboard /wp-admin3.63 ▲0.3345.02 ▼3.68
Posts /wp-admin/edit.php3.75 ▲0.3949.43 ▲7.69
Add New Post /wp-admin/post-new.php6.21 ▲0.3381.46 ▼16.41
Media Library /wp-admin/upload.php3.56 ▲0.3335.41 ▼1.86
All Popups /wp-admin/edit.php?post_type=popupzen3.6036.61
Add New /wp-admin/post-new.php?post_type=popupzen3.6975.67
Settings /wp-admin/edit.php?post_type=popupzen&page=popupzen3.5334.34

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Popup Zen - Small, Simple, Lightweight Email Optin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲11013.22 ▼1.096.70 ▲4.7441.85 ▼2.11
Dashboard /wp-admin2,237 ▲495.84 ▼0.0594.58 ▼10.3938.29 ▲0.32
Posts /wp-admin/edit.php2,120 ▲312.06 ▲0.0437.30 ▼4.0632.09 ▼6.96
Add New Post /wp-admin/post-new.php1,540 ▲2617.76 ▲0.32693.07 ▲90.4262.35 ▲12.06
Media Library /wp-admin/upload.php1,419 ▲284.19 ▼0.0496.11 ▼3.6744.38 ▲1.33
All Popups /wp-admin/edit.php?post_type=popupzen1,1402.3836.0129.92
Add New /wp-admin/post-new.php?post_type=popupzen3,0957.75188.21123.08
Settings /wp-admin/edit.php?post_type=popupzen&page=popupzen9222.1930.8025.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: optin, popup, lead generation, email opt-in, pop up

popup-zen/popup-zen.php Passed 13 tests

"Popup Zen - Small, Simple, Lightweight Email Optin" version 0.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
56 characters long description:
Ridding the web of obnoxious popups, one site at a time.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin3,362 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP45824501,225
CSS4211851,089
JavaScript436593831
PO File18591201
SVG14016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity38.00
▷ Minimum class complexity3.00
▷ Maximum class complexity61.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods57
▷ Static methods814.04%
▷ Public methods4884.21%
▷ Protected methods00.00%
▷ Private methods915.79%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/footer-bar-icon.png1.23KB0.30KB▼ 75.16%
assets/img/popup-icon.png2.25KB1.33KB▼ 40.62%
assets/img/header-bar-icon.png1.14KB0.21KB▼ 81.89%
assets/img/box-expanded-icon.png2.57KB1.66KB▼ 35.54%
assets/img/bottomleft-icon.png1.50KB0.41KB▼ 72.44%