83% popup-dialog-box

Code Review | Popup Dialog Box - Responsive Message Box

WordPress plugin Popup Dialog Box - Responsive Message Box scored83%from 54 tests.

About plugin

  • Plugin page: popup-dialog-box
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.6
  • WordPress version: 6.3.1
  • First release: Sep 13, 2012
  • Latest release: Jun 14, 2018
  • Number of updates: 23
  • Update frequency: every 91.5 days
  • Top authors: f1logic (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /40,960 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼8.64ms] Passed 4 tests

This is a short check of server-side resources used by Popup Dialog Box - Responsive Message Box
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2045.02 ▼4.83
Dashboard /wp-admin3.48 ▲0.1352.76 ▼15.37
Posts /wp-admin/edit.php3.58 ▲0.2253.28 ▼1.82
Add New Post /wp-admin/post-new.php6.19 ▲0.3080.73 ▼12.55
Media Library /wp-admin/upload.php3.42 ▲0.1939.60 ▼0.32
Popup Dialog Box /wp-admin/admin.php?page=popup-dialog-box-settings3.5138.88
Basic Settings /wp-admin/admin.php?page=popup-dialog-box-basic-settings3.3536.60
About /wp-admin/admin.php?page=popup-dialog-box-about3.4335.02

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 47 new options
New WordPress options
xyz_dbx_positioning
xyz_dbx_display_position
widget_recent-comments
xyz_dbx_border_color
xyz_dbx_repeat_interval_timing
xyz_dbx_bottom_dim
can_compress_scripts
xyz_dbx_mode
xyz_dbx_position_predefined
xyz_dbx_delay
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Popup Dialog Box - Responsive Message Box
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19513.44 ▼0.7110.56 ▲8.5645.48 ▲3.31
Dashboard /wp-admin2,217 ▲405.60 ▼0.0792.84 ▼5.5375.02 ▲29.82
Posts /wp-admin/edit.php2,140 ▲372.03 ▲0.0238.19 ▲0.8638.15 ▲4.11
Add New Post /wp-admin/post-new.php1,555 ▲2023.13 ▲5.06669.79 ▲58.7366.39 ▲5.90
Media Library /wp-admin/upload.php1,428 ▲314.15 ▼0.09107.74 ▲4.1172.78 ▲30.42
Popup Dialog Box /wp-admin/admin.php?page=popup-dialog-box-settings3,0096.93155.55131.23
Basic Settings /wp-admin/admin.php?page=popup-dialog-box-basic-settings1,2641.6924.3143.27
About /wp-admin/admin.php?page=popup-dialog-box-about1,8501.7026.1049.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 14 options
    • xyz_dbx_bottom_dim
    • xyz_dbx_title
    • xyz_dbx_free_version
    • widget_recent-comments
    • xyz_dbx_bottom
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • xyz_dbx_right
    • xyz_dbx_title_color
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/popup-dialog-box/admin/footer.php
    • > /wp-content/plugins/popup-dialog-box/popup-dialog-box.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: A description for screenshot #2 is missing in popup-dialog-box/assets to your readme.txt
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

popup-dialog-box/popup-dialog-box.php 92% from 13 tests

The main PHP script in "Popup Dialog Box - Responsive Message Box" version 1.2.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 417 characters long)

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
Success! There were no dangerous files found in this plugin2,391 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP16376511,915
CSS11103438
JavaScript27238

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/facebook.png0.65KB0.65KB▼ 0.75%
images/gplus.png1.06KB0.91KB▼ 13.85%
images/tick.png0.91KB0.87KB▼ 4.30%
images/xyz_logo.png9.26KB3.02KB▼ 67.36%
images/popup-dialog-box.png0.64KB0.68KB0.00%