73% popup-modal

Code Review | Popup Modal

WordPress plugin Popup Modal scored 73% from 54 tests.

About plugin

  • Plugin page: popup-modal
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Apr 12, 2016
  • Latest release: Feb 25, 2023
  • Number of updates: 57
  • Update frequency: every 44.0 days
  • Top authors: teckel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 5,516 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼1.38ms] Passed 4 tests

This is a short check of server-side resources used by Popup Modal
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.30 ▼1.46
Dashboard /wp-admin3.42 ▲0.1244.90 ▼1.09
Posts /wp-admin/edit.php3.47 ▲0.1149.33 ▲7.44
Add New Post /wp-admin/post-new.php6.00 ▲0.1183.71 ▼4.92
Media Library /wp-admin/upload.php3.34 ▲0.1134.96 ▲1.96
Add New /wp-admin/post-new.php?post_type=popup_modal3.2136.06
All Popups /wp-admin/edit.php?post_type=popup_modal3.3851.18

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Popup Modal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲11413.22 ▼1.141.87 ▲0.0241.24 ▼3.16
Dashboard /wp-admin2,233 ▲455.83 ▲0.9699.85 ▼9.3243.44 ▼1.14
Posts /wp-admin/edit.php2,110 ▲212.15 ▲0.1840.42 ▲6.9334.91 ▲2.63
Add New Post /wp-admin/post-new.php1,553 ▲3423.46 ▲0.05660.20 ▼24.8852.04 ▼5.95
Media Library /wp-admin/upload.php1,412 ▲274.25 ▲0.10105.01 ▼14.0145.37 ▼6.13
Add New /wp-admin/post-new.php?post_type=popup_modal2,8277.83191.7070.71
All Popups /wp-admin/edit.php?post_type=popup_modal1,1281.9337.3139.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+223
    Undefined index: popup_disable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+254
    Undefined index: popup_freq
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+225
    Undefined index: popup_expires
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+226
    Undefined index: popup_pages
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+227
    Undefined index: popup_click
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+228
    Undefined index: popup_location
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+229
    Undefined index: popup_width
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+230
    Undefined index: popup_title
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+231
    Undefined index: popup_color
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+232
    Undefined index: popup_bgcolor
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+233
    Undefined index: popup_buttons
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+254
    Trying to access array offset on value of type null
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+328
    Undefined variable: popup_freq
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+344
    Undefined variable: popup_pages
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+353
    Undefined variable: popup_click
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+363
    Undefined variable: popup_location
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+378
    Undefined variable: popup_title
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Notice in wp-content/plugins/popup-modal/popup-modal.php+401
    Undefined variable: popup_buttons

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/popup-modal/template.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=popup_modal
    • > Network (severe)
    wp-content/plugins/popup-modal/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not 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
Please fix the following attributes:
  • Tags: Too many tags (30 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

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

The main PHP file in "Popup Modal" ver. 2.2.0 adds more information about the plugin and also serves as the entry point for this plugin
118 characters long description:
Easily create responsive WYSIWYG modals that popup at your desired frequency and optionally print with a single click.

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
There were no executable files found in this plugin1,119 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS27669572
PHP22836382
JavaScript134165

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity101.00
▷ Minimum class complexity101.00
▷ Maximum class complexity101.00
Average method complexity12.11
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants15
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin