77% popup-more

Code Review | Popup – WordPress Popups and more popup modules

WordPress plugin Popup – WordPress Popups and more popup modules scored 77% from 54 tests.

About plugin

  • Plugin page: popup-more
  • Plugin version: 1.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 5.9.2
  • First release: Dec 25, 2020
  • Latest release: Mar 20, 2022
  • Number of updates: 197
  • Update frequency: every 2.3 days
  • Top authors: devfelixmoira (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active / 14,269 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲1.14MB] [CPU: ▼289.21ms] Passed 4 tests

Server-side resources used by Popup – WordPress Popups and more popup modules
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.68 ▲1.1671.51 ▲11.91
Dashboard /wp-admin4.52 ▲1.1153.87 ▲14.42
Posts /wp-admin/edit.php4.81 ▲1.1755.85 ▲6.47
Add New Post /wp-admin/post-new.php8.09 ▲1.12109.19 ▼1,177.31
Media Library /wp-admin/upload.php4.47 ▲1.1732.98 ▲2.09
Youtube module /wp-admin/edit.php?post_type=ypmyoutube4.5441.03
Facebook module /wp-admin/edit.php?post_type=ypmfacebook4.5335.25
Add New /wp-admin/post-new.php?post_type=popupmaster4.8758.75
Contact Form module (Pro) /wp-admin/edit.php?post_type=ypmcontactform4.5145.92
Iframe module (Pro) /wp-admin/edit.php?post_type=ypmiframe4.5235.50
All Popups /wp-admin/edit.php?post_type=popupmaster4.5241.57
Countdown module (Pro) /wp-admin/edit.php?post_type=ypmcountdown4.5136.75
Settings /wp-admin/edit.php?post_type=popupmaster&page=ypmSettingsPage4.4642.45
Social module (Pro) /wp-admin/edit.php?post_type=ypmsocial4.5134.76

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 159 new files
Database: 1 new table, 4 new options
New tables
wp_ypm_contact_form_fields
New WordPress options
ypm_redirect
YpmUsageDays
YpmShowNextTime
YpmInstallDate

Browser metrics Passed 4 tests

This is an overview of browser requirements for Popup – WordPress Popups and more popup modules
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,922 ▲17816.28 ▲0.646.08 ▼0.562.41 ▲0.23
Dashboard /wp-admin3,047 ▲1896.34 ▲0.15122.85 ▼7.30155.17 ▼6.53
Posts /wp-admin/edit.php2,846 ▲1523.27 ▲0.0264.41 ▼1.06143.76 ▼1.52
Add New Post /wp-admin/post-new.php1,966 ▲30522.14 ▲6.16389.70 ▼25.91170.23 ▲19.65
Media Library /wp-admin/upload.php1,854 ▲1565.61 ▲0.11138.38 ▼6.63184.90 ▼16.19
Youtube module /wp-admin/edit.php?post_type=ypmyoutube1,5113.4864.35112.39
Facebook module /wp-admin/edit.php?post_type=ypmfacebook1,5123.1962.26114.33
Add New /wp-admin/post-new.php?post_type=popupmaster7,38113.82342.33426.05
Contact Form module (Pro) /wp-admin/edit.php?post_type=ypmcontactform1,5143.2061.90109.75
Iframe module (Pro) /wp-admin/edit.php?post_type=ypmiframe1,4773.2062.61113.54
All Popups /wp-admin/edit.php?post_type=popupmaster1,6493.2259.42113.73
Countdown module (Pro) /wp-admin/edit.php?post_type=ypmcountdown1,5143.2160.40111.94
Settings /wp-admin/edit.php?post_type=popupmaster&page=ypmSettingsPage1,3622.5557.92103.40
Social module (Pro) /wp-admin/edit.php?post_type=ypmsocial1,5143.2060.27111.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=popupmaster
    • > Notice in wp-content/plugins/popup-more/assets/view/info.php+6
    Undefined index: post
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popupmaster
    • > Notice in wp-content/plugins/popup-more/classes/admin/conditionsBuilder/ConditionBuilder.php+194
    Undefined index: select_settings

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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/popup-more/assets/view/support.php
    • > /wp-content/plugins/popup-more/assets/view/upgrade.php
  • 58× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: popupTypeObj in wp-content/plugins/popup-more/assets/view/metaboxes/general/openEvents.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'YpmPopupData' not found in wp-content/plugins/popup-more/assets/view/metaboxes/general/generalView/themes.php:2
    • > PHP Warning
      Use of undefined constant YPM_POPUP_PKG - assumed 'YPM_POPUP_PKG' (this will throw an Error in a future version of PHP) in wp-content/plugins/popup-more/classes/Ajax.php on line 10
    • > PHP Warning
      Use of undefined constant YPM_POPUP_PKG - assumed 'YPM_POPUP_PKG' (this will throw an Error in a future version of PHP) in wp-content/plugins/popup-more/classes/popups/YoutubePopup.php on line 6
    • > PHP Warning
      Use of undefined constant YPM_POPUP_FREE - assumed 'YPM_POPUP_FREE' (this will throw an Error in a future version of PHP) in wp-content/plugins/popup-more/classes/popups/YoutubePopup.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popup-more/assets/view/facebook-types/shareButton.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/popup-more/assets/view/conditions-free.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/popup-more/assets/view/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/popup-more/assets/view/preview.php:3
    • > PHP Warning
      Use of undefined constant YPM_POPUP_HELPERS - assumed 'YPM_POPUP_HELPERS' (this will throw an Error in a future version of PHP) in wp-content/plugins/popup-more/config/data-config.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=ypmiframe
    • > Network (severe)
    wp-content/plugins/popup-more/assets/javascript/admin//iframe.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: popup, popup more, modal, popup window, popup maker...

popup-more/popup-more.php Passed 13 tests

The main PHP file in "Popup – WordPress Popups and more popup modules" ver. 1.7.2 adds more information about the plugin and also serves as the entry point for this plugin
77 characters long description:
Popup More is the most complete pop up plugin in the WordPress popup plugins.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected16,921 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript142,1145218,573
PHP701,1422336,259
CSS145402052,031
PO File1181858

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity11.82
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes43
▷ Abstract classes36.98%
▷ Concrete classes4093.02%
▷ Final classes00.00%
Methods383
▷ Static methods9324.28%
▷ Public methods32183.81%
▷ Protected methods20.52%
▷ Private methods6015.67%
Functions9
▷ Named functions333.33%
▷ Anonymous functions666.67%
Constants63
▷ Global constants63100.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
45 PNG files occupy 0.26MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/img/theme1.png34.98KB0.00KB▼ 100.00%
assets/img/colorbox5/close.png0.75KB0.24KB▼ 68.58%
(invalid) assets/img/theme3.png29.44KB0.00KB▼ 100.00%
assets/img/colorbox5/images/loading_background.png0.13KB0.15KB0.00%
assets/css/jQueryDialog/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%