10% splashpopup

Code Review | splashPopup

WordPress plugin splashPopup scored10%from 54 tests.

About plugin

  • Plugin page: splashpopup
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.2
  • WordPress version: 6.3.1
  • First release: May 10, 2019
  • Latest release: May 20, 2019
  • Number of updates: 8
  • Update frequency: every 1.3 days
  • Top authors: kernelroni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /589 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/splashpopup/includes/class-splash-popup.php+180
    extract() expects parameter 1 to be array, bool given

Server metrics [RAM: ▼1.89MB] [CPU: ▼51.90ms] Passed 4 tests

Server-side resources used by splashPopup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.07 ▼35.39
Dashboard /wp-admin2.11 ▼1.196.91 ▼44.15
Posts /wp-admin/edit.php2.12 ▼1.246.94 ▼39.61
Add New Post /wp-admin/post-new.php2.11 ▼3.776.23 ▼88.45
Media Library /wp-admin/upload.php2.11 ▼1.116.38 ▼25.87

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for splashPopup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲16914.87 ▲0.461.69 ▼0.2938.41 ▼5.82
Dashboard /wp-admin2,361 ▲1846.24 ▲0.67111.06 ▲24.2938.36 ▼2.84
Posts /wp-admin/edit.php2,289 ▲1893.43 ▲1.3649.68 ▲13.0630.54 ▼7.02
Add New Post /wp-admin/post-new.php1,551 ▲2523.12 ▼0.62633.91 ▼50.9336.02 ▼19.97
Media Library /wp-admin/upload.php1,427 ▲274.14 ▼0.0581.35 ▼17.3840.05 ▼5.99

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
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/splashpopup/includes/class-splash-popup.php+180
    extract() expects parameter 1 to be array, bool given
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/splashpopup/admin/partials/splash-popup-admin-display.php:14
    • > PHP Notice
      Undefined variable: duration in wp-content/plugins/splashpopup/admin/partials/splash-popup-admin-display.php on line 3
    • > PHP Notice
      Undefined variable: image in wp-content/plugins/splashpopup/public/partials/splash-popup-public-display.php on line 1
    • > PHP Notice
      Undefined variable: popup_interval in wp-content/plugins/splashpopup/admin/partials/splash-popup-admin-display.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === splashpopup === )
You can look at the official readme.txt

splashpopup/splash-popup.php 85% from 13 tests

This is the main PHP file of "splashPopup" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("splashpopup.php" instead of "splash-popup.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin446 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12265530369
CSS24453
JavaScript117924

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.55MB with 0.34MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
backend.png25.62KB9.55KB▼ 62.73%
frontend.png534.71KB209.84KB▼ 60.76%