72% modal-popup-box

Code Review | Modal Popup Box - Popup Builder, Show Offers And News in Popup

WordPress plugin Modal Popup Box - Popup Builder, Show Offers And News in Popup scored72%from 54 tests.

About plugin

  • Plugin page: modal-popup-box
  • Plugin version: 1.4.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 15, 2017
  • Latest release: Oct 20, 2023
  • Number of updates: 129
  • Update frequency: every 18.9 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active /93,156 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.13ms] 75% from 4 tests

An overview of server-side resources used by Modal Popup Box - Popup Builder, Show Offers And News in Popup
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 646.40ms on /wp-admin/edit.php?post_type=modalpopupbox&page=sr-featured-plugin-page)
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1247.45 ▲10.37
Dashboard /wp-admin3.45 ▲0.1142.79 ▼19.62
Posts /wp-admin/edit.php3.50 ▲0.1546.40 ▼1.87
Add New Post /wp-admin/post-new.php5.97 ▲0.0987.26 ▼1.10
Media Library /wp-admin/upload.php3.31 ▲0.0933.36 ▲2.09
Featured Plugin /wp-admin/edit.php?post_type=modalpopupbox&page=sr-featured-plugin-page3.63646.40
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.3932.29
Add New /wp-admin/post-new.php?post_type=modalpopupbox3.6145.70
All Modal Popup Box /wp-admin/edit.php?post_type=modalpopupbox3.3132.52
Our Theme /wp-admin/edit.php?post_type=modalpopupbox&page=sr-theme-page3.3229.57

Server storage [IO: ▲4.09MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Modal Popup Box - Popup Builder, Show Offers And News in Popup: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18313.43 ▼0.928.22 ▲6.3837.67 ▲0.70
Dashboard /wp-admin2,268 ▲885.64 ▲0.0696.10 ▲6.3647.83 ▲6.09
Posts /wp-admin/edit.php2,182 ▲822.06 ▲0.0540.76 ▲4.1640.87 ▲5.38
Add New Post /wp-admin/post-new.php1,589 ▲4923.33 ▲4.94585.03 ▼80.1351.88 ▼14.63
Media Library /wp-admin/upload.php1,484 ▲814.25 ▲0.0792.95 ▼0.8746.21 ▲4.61
Featured Plugin /wp-admin/edit.php?post_type=modalpopupbox&page=sr-featured-plugin-page3,4571.7829.11259.85
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0802.0321.9228.14
Add New /wp-admin/post-new.php?post_type=modalpopupbox3,3558.20215.38376.28
All Modal Popup Box /wp-admin/edit.php?post_type=modalpopupbox1,1601.9732.6832.69
Our Theme /wp-admin/edit.php?post_type=modalpopupbox&page=sr-theme-page1,0062.1824.8540.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=modalpopupbox
    • > Notice in wp-content/plugins/modal-popup-box/modal-popup-box.php+105
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=modalpopupbox
    • > Notice in wp-content/plugins/modal-popup-box/modal-popup-box.php+105
    Trying to access array offset on value of type null

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
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/modal-popup-box/modal-popup-box.php:314
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/modal-popup-box/our-theme/awp-theme.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/modal-popup-box/class-tgm-plugin-activation.php:2129
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/modal-popup-box/include/modal-popup-box-output.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/modal-popup-box/include/modal-popup-box-output.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/modal-popup-box/include/animation-effect.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/modal-popup-box/include/modal-popup-box-output.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/modal-popup-box/featured-plugins/featured-plugins.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=modalpopupbox&page=sr-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/modal-popup-box/css/bootstrap.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=modalpopupbox&page=sr-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/modal-popup-box/js/bootstrap.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=modalpopupbox&page=sr-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/modal-popup-box/js/featured-plugins/acl-media-upload-script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=modalpopupbox&page=sr-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/modal-popup-box/js/featured-plugins/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=modalpopupbox&page=sr-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/modal-popup-box/featured-plugins/fonts/bootstrap/glyphicons-halflings-regular-2.html - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=modalpopupbox&page=sr-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/modal-popup-box/featured-plugins/fonts/bootstrap/glyphicons-halflings-regular-3.html - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=modalpopupbox&page=sr-theme-page
    • > Network (severe)
    wp-content/plugins/modal-popup-box/js/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: modal popup, popup maker, popup box, responsive popups, popup builder...

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

"Modal Popup Box - Popup Builder, Show Offers And News in Popup" version 1.4.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)

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
There were no executable files found in this plugin46,582 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS163,36262034,068
JavaScript105862697,410
PHP86181,7153,248
SVG3001,628
PO File1102108228

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity43.00
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods117
▷ Static methods54.27%
▷ Public methods9278.63%
▷ Protected methods2521.37%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.53MB with 0.35MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
our-theme/img/aneeq-premium.png165.42KB57.84KB▼ 65.04%
assets/img/modal-pop-up-box.png309.42KB99.25KB▼ 67.92%
assets/img/modal-popup-box.png69.21KB25.70KB▼ 62.87%