66% m-wp-popup

Code Review | Popup | Custom Popup Builder

WordPress plugin Popup | Custom Popup Builder scored 66% from 54 tests.

About plugin

  • Plugin page: m-wp-popup
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8.1
  • WordPress version: 5.9.2
  • First release: May 9, 2013
  • Latest release: Jan 8, 2022
  • Number of updates: 159
  • Update frequency: every 19.9 days
  • Top authors: Muneeb (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

1,000+ active / 227,982 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼302.89ms] Passed 4 tests

An overview of server-side resources used by Popup | Custom Popup Builder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.2658.07 ▲8.79
Dashboard /wp-admin3.61 ▲0.2134.51 ▼0.59
Posts /wp-admin/edit.php3.84 ▲0.2095.97 ▲54.57
Add New Post /wp-admin/post-new.php7.14 ▲0.1793.97 ▼1,222.75
Media Library /wp-admin/upload.php3.56 ▲0.2729.52 ▲2.99
Global Settings /wp-admin/edit.php?post_type=wpp_popup&page=wpp-settings3.5024.76
WP Popup /wp-admin/edit.php?post_type=wpp_popup3.6029.38

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 1 new option
New WordPress options
wpp_old_version

Browser metrics Passed 4 tests

Popup | Custom Popup Builder: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,944 ▲20016.56 ▲0.9910.97 ▲4.762.42 ▼0.74
Dashboard /wp-admin2,930 ▲696.14 ▼0.05119.91 ▼20.14161.12 ▼4.05
Posts /wp-admin/edit.php2,729 ▲723.03 ▼0.2163.35 ▼1.61146.81 ▲2.86
Add New Post /wp-admin/post-new.php1,678 ▼2020.69 ▼1.15426.70 ▼9.11184.90 ▼32.54
Media Library /wp-admin/upload.php1,734 ▲425.53 ▲0.00142.43 ▼11.21193.97 ▼38.12
Global Settings /wp-admin/edit.php?post_type=wpp_popup&page=wpp-settings1,3512.8078.75113.94
WP Popup /wp-admin/edit.php?post_type=wpp_popup1,5293.2274.85127.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • wpp_old_version

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpp_popup&page=wpp-settings
    • > Notice in wp-content/plugins/m-wp-popup/views/settings_page.php+34
    Undefined index: email_service

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/m-wp-popup/views/themes/default/admin_view.php
  • 44× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/m-wp-popup/views/themes/default/admin_view.php on line 14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/m-wp-popup/views/themes/default/admin_view.php on line 4
    • > PHP Notice
      Undefined variable: post_status in wp-content/plugins/m-wp-popup/views/custom_publish_meta_box.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/m-wp-popup/views/href_link_popup.php:4
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/m-wp-popup/views/themes/default/admin_view.php on line 14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/m-wp-popup/views/themes/default/admin_view.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/m-wp-popup/config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/m-wp-popup/views/theme_style_metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/m-wp-popup/views/custom_publish_meta_box.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/m-wp-popup/views/themes/default/auto_popup.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpp_popup
    • > Javascript (severe) in unknown
    /wp-content/plugins/m-wp-popup/js/jquery.ibutton.min.js?ver=1.0 20:630 Uncaught TypeError: Cannot set properties of undefined (setting 'iphone')

Optimizations

Plugin configuration 93% 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 need to be fixed:
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
Please take inspiration from this readme.txt

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

"Popup | Custom Popup Builder" version 1.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("m-wp-popup.php" instead of "wp-popup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected4,311 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP291,2171,9923,202
CSS412922914
JavaScript515040195

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity18.14
▷ Minimum class complexity4.00
▷ Maximum class complexity41.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods186
▷ Static methods21.08%
▷ Public methods18599.46%
▷ Protected methods00.00%
▷ Private methods10.54%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/colorbox/images/controls.png1.59KB1.67KB0.00%
css/jquery-ibutton/images/ibutton-slider-giva2.png4.20KB2.68KB▼ 36.22%
images/pointer.png1.16KB1.25KB0.00%
views/themes/default/green-tick.png0.86KB0.71KB▼ 17.42%
css/colorbox/images/closeButton.png4.28KB1.43KB▼ 66.67%