78% easy-popup-lightbox-maker

Code Review | WP Popup Window Maker

WordPress plugin WP Popup Window Maker scored78%from 54 tests.

About plugin

  • Plugin page: easy-popup-lightb...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2018
  • Latest release: Sep 23, 2023
  • Number of updates: 39
  • Update frequency: every 45.0 days
  • Top authors: wp-buy (61.54%)codepressplugins (30.77%)osamaesh (12.82%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /7,172 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.43MB] [CPU: ▼6.09ms] Passed 4 tests

A check of server-side resources used by WP Popup Window Maker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4245.32 ▲6.25
Dashboard /wp-admin3.79 ▲0.4554.85 ▼4.29
Posts /wp-admin/edit.php3.86 ▲0.5050.37 ▲3.40
Add New Post /wp-admin/post-new.php6.33 ▲0.4482.14 ▼14.93
Media Library /wp-admin/upload.php3.65 ▲0.4237.20 ▼8.52
WP Popup Maker /wp-admin/admin.php?page=eplm_popups3.6740.27
Edit Popup /wp-admin/admin.php?page=eplm_popups_edit3.6534.32
Add\Edit Popup /wp-admin/admin.php?page=eplm_popups_template3.6937.29
Save Popup /wp-admin/admin.php?page=eplm_save3.6132.90

Server storage [IO: ▲1.90MB] [DB: ▲0.03MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 53 new files
Database: 2 new tables, 6 new options
New tables
wp_eplm_popups_template
wp_eplm_popups
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Popup Window Maker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲19314.48 ▲0.081.79 ▲0.2244.47 ▲5.33
Dashboard /wp-admin2,354 ▲1776.28 ▲0.68120.48 ▲31.6942.04 ▼3.77
Posts /wp-admin/edit.php2,288 ▲1883.37 ▲1.3747.67 ▲11.9330.63 ▼5.30
Add New Post /wp-admin/post-new.php1,550 ▲2423.17 ▲0.06644.05 ▼34.7937.44 ▼17.80
Media Library /wp-admin/upload.php1,428 ▲344.23 ▲0.0579.24 ▼19.3544.19 ▼0.05
WP Popup Maker /wp-admin/admin.php?page=eplm_popups1,1263.7253.2567.28
Edit Popup /wp-admin/admin.php?page=eplm_popups_edit4,1916.24224.32125.54
Add\Edit Popup /wp-admin/admin.php?page=eplm_popups_template1,1173.6943.6365.41
Save Popup /wp-admin/admin.php?page=eplm_save1,8454.7850.8041.87

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+609
    Undefined variable: template_id
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/eplm_theames.php+12
    Undefined variable: templates
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eplm_save
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/eplm_functions.php+516
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Warning in wp-content/plugins/easy-popup-lightbox-maker/pages/eplm_theames.php+12
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+216
    Undefined variable: titlesize
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+292
    Undefined variable: color_picker
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+307
    Undefined variable: footer_color_picker
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+325
    Undefined variable: header_color_picker
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+832
    Undefined variable: closebtnsize
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+844
    Undefined variable: close_btn_width
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+864
    Undefined variable: close_btn_height
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+876
    Undefined variable: closebtnpadding
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+911
    Undefined variable: closebtnb_radius
    • > GET request to /wp-admin/admin.php?page=eplm_popups_edit
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/options_block.php+1024
    Undefined variable: iconsize
    • > GET request to /wp-admin/admin.php?page=eplm_save
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/eplm_functions.php+369
    Undefined index: temp_id
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eplm_save
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/eplm_functions.php+516
    Undefined index: options
    • > GET request to /wp-admin/admin.php?page=eplm_save
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/eplm_functions.php+429
    Undefined index: pop_name
    • > GET request to /wp-admin/admin.php?page=eplm_save
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/eplm_functions.php+589
    Undefined index: hreflocation2
    • > GET request to /wp-admin/admin.php?page=eplm_save
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/eplm_functions.php+590
    Undefined index: hreflocation
    • > GET request to /wp-admin/admin.php?page=eplm_save
    • > Notice in wp-content/plugins/easy-popup-lightbox-maker/pages/view_popups.php+138
    Undefined variable: temp_name

SRP 50% from 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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-popup-lightbox-maker/includes/media_uploader_functions.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-popup-lightbox-maker/includes/media_uploader_functions.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
  • Screenshots: Screenshot #2 (Youtube popup) image not found
You can take inspiration from this readme.txt

easy-popup-lightbox-maker/easy_popup_lightbox_maker.php 92% from 13 tests

"WP Popup Window Maker" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-popup-lightbox-maker.php" instead of "easy_popup_lightbox_maker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin29,130 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS111,75210823,109
PHP121,2891103,717
JavaScript63222232,016
SVG100288

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 0.14MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png33.62KB15.52KB▼ 53.84%
pages/templates/8.png0.64KB0.28KB▼ 56.44%
pages/templates/4.png1.36KB0.72KB▼ 46.73%
pages/icons/if_17_2739104.png0.47KB0.78KB0.00%
pages/icons/if_98_111048.png0.46KB0.61KB0.00%