57% welcome-popup-box

Code Review | Welcome Popup Box

WordPress plugin Welcome Popup Box scored57%from 54 tests.

About plugin

  • Plugin page: welcome-popup-box
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1.1
  • WordPress version: 6.3.1
  • First release: May 20, 2023
  • Latest release: May 20, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: walexconcepts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /99 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.90MB] [CPU: ▼58.55ms] Passed 4 tests

Server-side resources used by Welcome Popup Box
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.36 ▼40.54
Dashboard /wp-admin2.11 ▼1.205.69 ▼48.09
Posts /wp-admin/edit.php2.11 ▼1.255.92 ▼43.96
Add New Post /wp-admin/post-new.php2.11 ▼3.787.06 ▼101.62
Media Library /wp-admin/upload.php2.11 ▼1.126.72 ▼29.40
Help /wp-admin/admin.php?page=help_welcomebox2.115.19
Settings /wp-admin/admin.php?page=addnews_welcomebox2.117.76

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Welcome Popup Box
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,319 ▲57313.99 ▼0.2413.24 ▲11.4349.08 ▲0.54
Dashboard /wp-admin2,234 ▲495.03 ▲0.09101.67 ▼8.9889.48 ▲46.64
Posts /wp-admin/edit.php2,135 ▲432.34 ▲0.3040.24 ▼2.2334.46 ▼2.05
Add New Post /wp-admin/post-new.php1,548 ▲1223.36 ▲0.05654.64 ▼45.0239.36 ▼13.79
Media Library /wp-admin/upload.php1,425 ▲404.33 ▲0.12113.53 ▲18.0384.69 ▲41.20
Help /wp-admin/admin.php?page=help_welcomebox9041.9225.9723.96
Settings /wp-admin/admin.php?page=addnews_welcomebox1,5962.6049.4698.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/welcome-popup-box/admin/welcome_pop_up_box_help.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function welcome_pop_up_box_allowed_html() in wp-content/plugins/welcome-popup-box/include/welcome_pop_up_box_form.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/welcome-popup-box/admin/welcome_pop_up_box_form.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/jquery.sceditor.default.css - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/alien.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/blink.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/blush.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/cheerful.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/devil.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/dizzy.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/getlost.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/happy.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/kissing.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/ninja.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/pinch.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/pouty.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/sick.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/sideways.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/silly.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/sleeping.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/unsure.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/w00t.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/wassat.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/smile.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/angel.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/angry.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/cool.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/cwy.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/ermm.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/grin.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/heart.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/sad.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/tongue.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/shocked.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/wink.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/whistling.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=addnews_welcomebox
    • > Network (severe)
    wp-admin/emoticons/wub.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: popup, responsive welcome box, box, welcome, message

welcome-popup-box/index.php 92% from 13 tests

"Welcome Popup Box" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("welcome-popup-box.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected5,131 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript191,1712,7904,187
CSS10106364527
PHP56522412
SQL1105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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 functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
37 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/emoticons/wub.png0.99KB0.97KB▼ 1.98%
admin/emoticons/heart.png0.56KB0.80KB0.00%
admin/emoticons/getlost.png0.77KB0.99KB0.00%
admin/emoticons/whistling.png1.05KB1.03KB▼ 1.68%
admin/emoticons/face.png0.77KB0.97KB0.00%