72% custom-popup-builder-for-elementor

Code Review | Custom Popup Builder for Elementor

WordPress plugin Custom Popup Builder for Elementor scored72%from 54 tests.

About plugin

  • Plugin page: custom-popup-buil...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 17, 2019
  • Latest release: Dec 19, 2019
  • Number of updates: 5
  • Update frequency: every 12.6 days
  • Top authors: onex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,027 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by Custom Popup Builder for Elementor
It is recommended to improve the following
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 336.72ms on /wp-admin/index.php?page=cpbe-setup)
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.87 ▲1.78
Dashboard /wp-admin3.19 ▼0.11502.86 ▲456.71
Posts /wp-admin/edit.php3.26 ▼0.09931.90 ▲885.61
Add New Post /wp-admin/post-new.php5.50 ▼0.38551.09 ▲460.64
Media Library /wp-admin/upload.php3.21 ▼0.02460.51 ▲427.75
/wp-admin/index.php?page=cpbe-setup3.1024.13

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Custom Popup Builder for Elementor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.31 ▼0.881.55 ▼0.0638.09 ▼0.11
Dashboard /wp-admin2,239 ▲484.86 ▼1.0498.10 ▼2.9538.32 ▼1.69
Posts /wp-admin/edit.php2,121 ▲291.97 ▼0.0533.91 ▼6.2334.61 ▼0.39
Add New Post /wp-admin/post-new.php1,555 ▲1823.66 ▲0.49666.07 ▲8.8753.22 ▼0.28
Media Library /wp-admin/upload.php1,421 ▲364.16 ▼0.06100.90 ▼1.0443.09 ▲0.28
/wp-admin/index.php?page=cpbe-setup780.480.7412.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/index.php?page=cpbe-setup
    • > Notice in wp-content/plugins/custom-popup-builder-for-elementor/custom-popup-builder.php+271
    Undefined variable: address

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
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/custom-popup-builder-for-elementor/templates/vue-templates/preset-page.php
    • > /wp-content/plugins/custom-popup-builder-for-elementor/templates/vue-templates/preset-list.php
    • > /wp-content/plugins/custom-popup-builder-for-elementor/templates/vue-templates/settings-page.php
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/custom-popup-builder-for-elementor/templates/popup-container.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/custom-popup-builder-for-elementor/templates/vue-templates/preset-library.php:2
    • > PHP Notice
      Undefined variable: popup_json_data in wp-content/plugins/custom-popup-builder-for-elementor/templates/popup-container.php on line 16
    • > PHP Notice
      Undefined variable: popup_settings_main in wp-content/plugins/custom-popup-builder-for-elementor/templates/popup-container.php on line 23
    • > PHP Notice
      Undefined variable: popup_settings_main in wp-content/plugins/custom-popup-builder-for-elementor/templates/popup-container.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/custom-popup-builder-for-elementor/templates/vue-templates/preset-item.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/custom-popup-builder-for-elementor/templates/vue-templates/preset-filters.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-popup-builder-for-elementor/templates/vue-templates/editor/condition-item.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/custom-popup-builder-for-elementor/templates/popup-container.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/custom-popup-builder-for-elementor/templates/popup-container.php on line 23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 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
7 plugin tags: built-in layout, animation effect, custom popup, elementor, elementor addons...

custom-popup-builder-for-elementor/custom-popup-builder.php 85% from 13 tests

The main PHP script in "Custom Popup Builder for Elementor" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 160 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-popup-builder-for-elementor.php" instead of "custom-popup-builder.php")

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
Success! There were no dangerous files found in this plugin41,915 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript148,1814,04134,591
PHP481,686466,442
SVG100870
CSS6006
JSON6006

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.60
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes35
▷ Abstract classes25.71%
▷ Concrete classes3394.29%
▷ Final classes00.00%
Methods291
▷ Static methods248.25%
▷ Public methods28196.56%
▷ Protected methods103.44%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/dummy-popups/popup-5/thumbnail.png1.78KB1.39KB▼ 21.72%
assets/image/icon-128x128.png3.95KB2.50KB▼ 36.71%
templates/dummy-popups/popup-3/thumbnail.png1.64KB1.28KB▼ 21.84%
templates/dummy-popups/popup-2/thumbnail.png1.84KB1.44KB▼ 21.73%
templates/dummy-popups/popup-4/thumbnail.png1.73KB1.38KB▼ 20.00%