74% welcome-popup

Code Review | Welcome Popup

WordPress plugin Welcome Popup scored74%from 54 tests.

About plugin

  • Plugin page: welcome-popup
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.1
  • WordPress version: 6.3.1
  • First release: Jan 10, 2014
  • Latest release: Feb 1, 2023
  • Number of updates: 23
  • Update frequency: every 143.9 days
  • Top authors: WeblineIndia (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active /18,806 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼1.87ms] Passed 4 tests

A check of server-side resources used by Welcome Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1937.92 ▼4.86
Dashboard /wp-admin3.48 ▲0.1451.61 ▼0.52
Posts /wp-admin/edit.php3.60 ▲0.2051.43 ▲1.21
Add New Post /wp-admin/post-new.php6.06 ▲0.1495.09 ▲5.58
Media Library /wp-admin/upload.php3.41 ▲0.1437.07 ▼3.32
Welcome Popup /wp-admin/options-general.php?page=welcome_popup_page3.4644.88

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
welcome_popup_settings
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Welcome Popup: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,084 ▲32313.83 ▼0.4329.40 ▲27.5847.47 ▲6.49
Dashboard /wp-admin2,199 ▲285.65 ▼0.0589.48 ▼4.1240.40 ▼2.62
Posts /wp-admin/edit.php2,106 ▲32.02 ▼0.0239.23 ▲0.8738.24 ▲4.12
Add New Post /wp-admin/post-new.php1,538 ▲1218.22 ▼4.90635.06 ▼52.2771.82 ▲18.22
Media Library /wp-admin/upload.php1,404 ▲14.20 ▲0.0299.04 ▼3.3139.87 ▼8.77
Welcome Popup /wp-admin/options-general.php?page=welcome_popup_page2,7127.96189.93127.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/welcome-popup/welcome_popup.php+88
    Undefined variable: default_value
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/welcome-popup/welcome_popup.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: hello bar, popup bar, wordpress popup, welcome popup, first visit popup...

welcome-popup/welcome_popup.php 85% from 13 tests

The main PHP file in "Welcome Popup" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("welcome-popup.php" instead of "welcome_popup.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 247 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin3,560 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42675721,724
CSS33531101,027
PHP281136657
PO File44460152

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/close.png18.40KB0.69KB▼ 96.27%
images/default.png4.13KB2.42KB▼ 41.32%
images/logo.png0.24KB0.25KB0.00%