68% wp-popup-banners

Code Review | WP Popup Banners

WordPress plugin WP Popup Banners scored 68% from 54 tests.

About plugin

  • Plugin page: wp-popup-banners
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.8
  • WordPress version: 5.9.2
  • First release: Apr 26, 2016
  • Latest release: Dec 8, 2021
  • Number of updates: 40
  • Update frequency: every 51.4 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

4,000+ active / 77,281 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼301.68ms] Passed 4 tests

A check of server-side resources used by WP Popup Banners
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1054.53 ▲3.34
Dashboard /wp-admin3.48 ▲0.0833.64 ▼4.69
Posts /wp-admin/edit.php3.71 ▲0.0736.44 ▼1.23
Add New Post /wp-admin/post-new.php6.95 ▼0.0294.25 ▼1,200.63
Media Library /wp-admin/upload.php3.36 ▲0.0726.59 ▼0.18

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 45 new files
Database: 1 new table, 1 new option
New tables
wp_popup_banners
New WordPress options
wpb_default_settings

Browser metrics Passed 4 tests

An overview of browser requirements for WP Popup Banners
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,782 ▲2815.88 ▼0.175.90 ▲0.022.17 ▼1.03
Dashboard /wp-admin2,911 ▲506.18 ▲0.00115.83 ▼16.14181.93 ▲16.49
Posts /wp-admin/edit.php2,708 ▲173.11 ▼0.2564.12 ▲2.13142.06 ▼0.80
Add New Post /wp-admin/post-new.php1,732 ▲7121.97 ▲6.46407.70 ▼11.97163.07 ▲11.16
Media Library /wp-admin/upload.php1,718 ▲265.55 ▲0.08127.00 ▼14.55208.86 ▲18.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_popup_banners
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • wpb_default_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 10× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-popup-banners/inc/backend/save_new_popup.php
    • > /wp-content/plugins/wp-popup-banners/inc/backend/create_new_popup.php
    • > /wp-content/plugins/wp-popup-banners/inc/main_popup.php
    • > /wp-content/plugins/wp-popup-banners/inc/activation.php
    • > /wp-content/plugins/wp-popup-banners/inc/backend/sidebar.php
    • > /wp-content/plugins/wp-popup-banners/inc/get_db_data.php
    • > /wp-content/plugins/wp-popup-banners/inc/backend/tabs/more-wordpress-stuffs.php
    • > /wp-content/plugins/wp-popup-banners/inc/backend/main-page.php
    • > /wp-content/plugins/wp-popup-banners/wp-popup-banners.php
    • > /wp-content/plugins/wp-popup-banners/inc/frontend_main_popup.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-popup-banners/inc/backend/tabs/about.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wp-popup-banners/inc/backend/tabs/manage_option.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-popup-banners/inc/backend/tabs/setting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-popup-banners/inc/backend/manage-popup-tabs/general-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-popup-banners/inc/backend/manage-popup-tabs/display-settings.php:4
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-popup-banners/inc/backend/tabs/manage_option.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: popup with animation, popup on page load, custom popup, popup on every post, popup image...

wp-popup-banners/wp-popup-banners.php 92% from 13 tests

The entry point to "WP Popup Banners" version 1.2.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

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
Good job! No executable or dangerous file extensions detected5,385 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS4132702,451
PHP152091611,511
JavaScript5124166858
SVG100565

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.87
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 1.42MB with 0.67MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pro_upgrade_1.png542.62KB20.98KB▼ 96.13%
images/logo.png9.95KB5.31KB▼ 46.67%
images/close.png0.26KB0.27KB0.00%
images/wpb1.png3.04KB0.24KB▼ 92.04%
images/admin-bar-sprite-2x.png3.91KB3.91KB0.00%