52% dream-popup

Code Review | dream popup

WordPress plugin dream popup scored52%from 54 tests.

About plugin

  • Plugin page: dream-popup
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 6.3.1
  • First release: Apr 3, 2021
  • Latest release: Apr 3, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: teamdream (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼40.58ms] Passed 4 tests

This is a short check of server-side resources used by dream popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0126.24 ▼15.25
Dashboard /wp-admin3.06 ▼0.2922.93 ▼41.73
Posts /wp-admin/edit.php3.06 ▼0.3022.90 ▼24.81
Add New Post /wp-admin/post-new.php3.06 ▼2.8322.62 ▼79.71
Media Library /wp-admin/upload.php3.06 ▼0.1720.63 ▼16.08
Create popup /wp-admin/admin.php?page=custom-plugin23.0623.79
Dream Popup /wp-admin/admin.php?page=dreampopup3.0627.86
All Popups /wp-admin/admin.php?page=all-popups3.0623.16

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 26 new files
Database: 1 new table, 6 new options
New tables
wp_popupdata
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

dream popup: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.81 ▼0.566.20 ▲4.2444.78 ▲1.04
Dashboard /wp-admin2,240 ▲525.86 ▲0.7297.80 ▼9.1937.75 ▼5.17
Posts /wp-admin/edit.php2,129 ▲402.02 ▼0.1235.42 ▼1.3832.77 ▼1.49
Add New Post /wp-admin/post-new.php1,548 ▲2423.34 ▲0.12664.54 ▲60.6950.26 ▼4.15
Media Library /wp-admin/upload.php1,422 ▲314.21 ▼0.0397.11 ▲0.6740.78 ▼3.60
Create popup /wp-admin/admin.php?page=custom-plugin22,2476.72137.6263.46
Dream Popup /wp-admin/admin.php?page=dreampopup2,1396.57138.6330.94
All Popups /wp-admin/admin.php?page=all-popups2,1366.58118.3528.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_popupdata
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+78
    Undefined index: editid
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+132
    Undefined variable: title2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+137
    Undefined variable: class2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+142
    Undefined variable: btntext2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+147
    Undefined variable: contentpopup2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+169
    Undefined variable: FontSize2
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+170
    Undefined variable: Color2
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+171
    Undefined variable: txtclrhover2
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+174
    Undefined variable: bgcolor2
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+175
    Undefined variable: BgColorhover2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+178
    Undefined variable: BorderSize2
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+179
    Undefined variable: BorderColor2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+180
    Undefined variable: Borderradius2
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+181
    Undefined variable: BorderColorHover2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+185
    Undefined variable: btnszeupdte2
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+188
    Undefined variable: txtalign2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+195
    Undefined variable: margin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+196
    Undefined variable: padding
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+212
    Undefined variable: titlesizeupdte
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+213
    Undefined variable: titlecolorupdte
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+214
    Undefined variable: popfntsze
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+215
    Undefined variable: poptxtcolor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+220
    Undefined variable: popBgcolor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+223
    Undefined variable: popBordersize
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+224
    Undefined variable: popBorderclr
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+225
    Undefined variable: popBorderradius
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+229
    Undefined variable: popwidth
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+236
    Undefined variable: popMargin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+237
    Undefined variable: popPadding
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+242
    Undefined variable: popanimation
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+253
    Undefined variable: popanimationspeed
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+258
    Undefined variable: opacityclr
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+260
    Undefined variable: popopacity
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+263
    Undefined variable: poptransition
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+269
    Undefined variable: popclosebtnclr2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+270
    Undefined variable: crossbtnszeupdte
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+281
    Undefined variable: activecokie
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+283
    Undefined variable: cokiename
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+287
    Undefined variable: cokietime
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Notice in wp-content/plugins/dream-popup/views/all-pages.php+288
    Undefined variable: cokiehour

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
Please fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dream-popup/views/all-pages.php
    • > /wp-content/plugins/dream-popup/index.php
    • > /wp-content/plugins/dream-popup/views/imageslider.php
    • > /wp-content/plugins/dream-popup/dreampopup.php
    • > /wp-content/plugins/dream-popup/views/popup.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 230 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 231 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 234 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 235 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 239 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 241 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 273 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 275 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 280 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 284 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 318 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=dreampopup 329 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=dreampopup
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=dreampopup 370:77 Uncaught TypeError: Cannot read properties of null (reading 'setAttribute')
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 230 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 231 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 234 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 235 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 239 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 241 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 273 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 275 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 280 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 284 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 318 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=all-popups 329 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=all-popups
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=all-popups 370:77 Uncaught TypeError: Cannot read properties of null (reading 'setAttribute')

Optimizations

Plugin configuration 86% 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 your attention:
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

dream-popup/dreampopup.php 77% from 13 tests

The main PHP file in "dream popup" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.6" instead of "5.2")
  • Main file name: Name the main plugin file the same as the plugin slug ("dream-popup.php" instead of "dreampopup.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin4,798 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,6291073,580
PHP525152929
JavaScript17624241
SVG10148

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png5.19KB2.75KB▼ 46.98%
assets/icon-128x128.png2.33KB1.38KB▼ 40.89%