68% modal-window

Code Review | Modal Window - create popup modal window

WordPress plugin Modal Window - create popup modal window scored68%from 54 tests.

About plugin

  • Plugin page: modal-window
  • Plugin version: 5.3.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.4
  • WordPress version: 6.3.1
  • First release: May 6, 2016
  • Latest release: Nov 3, 2023
  • Number of updates: 158
  • Update frequency: every 17.3 days
  • Top authors: Wpcalc (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

10,000+ active /266,004 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.70ms] Passed 4 tests

Server-side resources used by Modal Window - create popup modal window
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.51 ▼5.00
Dashboard /wp-admin3.34 ▼0.0143.54 ▼17.34
Posts /wp-admin/edit.php3.39 ▲0.0346.98 ▲1.41
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.49 ▼13.85
Media Library /wp-admin/upload.php3.26 ▲0.0337.85 ▲5.81
Modal Window /wp-admin/admin.php?page=modal-window3.4033.91
Welcome /wp-admin/admin.php?page=wow-company3.2531.50

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 145 new files
Database: 1 new table, 7 new options
New tables
wp_wow_mwp
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
wow_mwp_updater_5.0

Browser metrics Passed 4 tests

This is an overview of browser requirements for Modal Window - create popup modal window
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲12314.35 ▼0.281.66 ▼0.0544.41 ▲1.25
Dashboard /wp-admin2,275 ▲985.65 ▼0.0187.55 ▲0.5172.32 ▲33.02
Posts /wp-admin/edit.php2,183 ▲831.99 ▲0.0342.05 ▲4.4134.85 ▼0.17
Add New Post /wp-admin/post-new.php1,573 ▲4718.12 ▼3.32692.08 ▲53.9257.41 ▲4.64
Media Library /wp-admin/upload.php1,480 ▲774.22 ▲0.04102.16 ▲2.4075.25 ▲33.43
Modal Window /wp-admin/admin.php?page=modal-window1,1862.3146.6639.63
Welcome /wp-admin/admin.php?page=wow-company9391.9926.5844.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wow_mwp
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • wow_mwp_updater_5.0
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 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 0% from 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/modal-window/admin/page-tools.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/modal-window/admin/settings/settings/settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/modal-window/admin/settings/style/settings.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Overview), #2 (Create modal windows & insert any content), #3 (Insert a form (together with Wow Forms plugin)), #4 (Create exit intent popups. Retain users on your website or at least offer the abandoning users something valuable to capture their emails.), #5 (Setup any widgets. Insert any other plugins' shortcodes.), #6 (Create a phone call request widget), #7 (Use for showing ads), #8 (Modal window setup example), #9 (Features), #10 (Pro version features)
You can look at the official readme.txt

modal-window/modal-window.php Passed 13 tests

The main PHP script in "Modal Window - create popup modal window" version 5.3.8 is automatically included on every request by WordPress
55 characters long description:
Create popups. Insert any content. Trigger on anything.

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
Good job! No executable or dangerous file extensions detected34,131 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
CSS193,61313915,968
SVG40129,464
PHP488707447,464
JavaScript132192031,235

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity17.20
▷ Minimum class complexity5.00
▷ Maximum class complexity30.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes240.00%
Methods68
▷ Static methods1116.18%
▷ Public methods5986.76%
▷ Protected methods11.47%
▷ Private methods811.76%
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

All PNG images should be compressed to minimize bandwidth usage for end users
16 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/remove_close.png3.59KB1.50KB▼ 58.21%
admin/assets/img/autoclose.png3.19KB1.11KB▼ 65.16%
admin/assets/img/modal-window-logo.png2.72KB1.19KB▼ 56.23%
admin/assets/img/form.png3.81KB1.95KB▼ 48.85%
admin/assets/img/display.png3.76KB1.68KB▼ 55.28%