74% popup-box

Code Review | Popup Box - new WordPress popup plugin

WordPress plugin Popup Box - new WordPress popup plugin scored74%from 54 tests.

About plugin

  • Plugin page: popup-box
  • Plugin version: 2.2.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.4
  • WordPress version: 6.3.1
  • First release: Jan 29, 2020
  • Latest release: Oct 31, 2023
  • Number of updates: 37
  • Update frequency: every 37.1 days
  • Top authors: Wpcalc (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

3,000+ active /29,371 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.94ms] Passed 4 tests

Server-side resources used by Popup Box - new WordPress popup plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1440.88 ▼0.60
Dashboard /wp-admin3.45 ▲0.1047.21 ▼16.50
Posts /wp-admin/edit.php3.56 ▲0.2048.00 ▲2.12
Add New Post /wp-admin/post-new.php6.03 ▲0.1492.81 ▼8.07
Media Library /wp-admin/upload.php3.37 ▲0.1435.65 ▼2.57
All Popups /wp-admin/admin.php?page=popup-box3.4836.41

Server storage [IO: ▲0.92MB] [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: 85 new files
Database: 1 new table, 7 new options
New tables
wp_popup_box
New WordPress options
widget_theysaidso_widget
wow_popup_box_updater_2
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Popup Box - new WordPress popup plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9914.14 ▼0.561.88 ▲0.2539.76 ▼5.09
Dashboard /wp-admin2,223 ▲455.62 ▲0.0292.86 ▼12.9739.96 ▼3.55
Posts /wp-admin/edit.php2,131 ▲312.12 ▲0.1539.85 ▲3.4237.99 ▲3.18
Add New Post /wp-admin/post-new.php1,551 ▲2223.35 ▲0.20639.57 ▲47.9657.52 ▲4.51
Media Library /wp-admin/upload.php1,431 ▲314.23 ▼0.0196.11 ▼5.0644.32 ▲0.47
All Popups /wp-admin/admin.php?page=popup-box1,1062.3042.0926.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_popup_box
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • wow_popup_box_updater_2
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/popup-box/admin/settings/options/style.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/popup-box/admin/settings/options/settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/popup-box/admin/settings/options/content.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Frontend), #2 (Popup content), #3 (Popup Style), #4 (Settings), #5 (Display Rules)
The official readme.txt is a good inspiration

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

This is the main PHP file of "Popup Box - new WordPress popup plugin" version 2.2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
29 characters long description:
Easily create Powered Popups.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected14,335 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
CSS82,0311339,335
PHP345486163,636
JavaScript122251831,364

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.75
▷ Minimum class complexity6.00
▷ Maximum class complexity34.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods55
▷ Static methods1120.00%
▷ Public methods4989.09%
▷ Protected methods11.82%
▷ Private methods59.09%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png11.36KB4.55KB▼ 59.93%
admin/assets/img/schedule.png2.73KB0.64KB▼ 76.66%
admin/assets/img/remove_close.png3.59KB1.50KB▼ 58.21%
admin/assets/img/display.png3.76KB1.68KB▼ 55.28%
admin/assets/img/animation.png3.98KB1.81KB▼ 54.49%