78% onex-custom-popup-builder

Code Review | Onex Custom Popup Builder

WordPress plugin Onex Custom Popup Builder scored78%from 54 tests.

About plugin

  • Plugin page: onex-custom-popup...
  • 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: Aug 28, 2019
  • Latest release: Aug 28, 2019
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: onex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.47ms] Passed 4 tests

Server-side resources used by Onex Custom Popup Builder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.80 ▼2.45
Dashboard /wp-admin3.33 ▼0.0246.07 ▼19.13
Posts /wp-admin/edit.php3.38 ▲0.0247.87 ▼1.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.95 ▼14.42
Media Library /wp-admin/upload.php3.25 ▲0.0235.98 ▼1.87

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 88 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Onex Custom Popup Builder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.25 ▼1.061.92 ▲0.2837.77 ▼5.65
Dashboard /wp-admin2,222 ▲304.86 ▼0.0996.71 ▼20.7740.39 ▼5.01
Posts /wp-admin/edit.php2,110 ▲212.02 ▼0.0439.51 ▲1.4137.12 ▲1.23
Add New Post /wp-admin/post-new.php1,556 ▲1418.19 ▼0.08601.24 ▼66.3547.69 ▼3.12
Media Library /wp-admin/upload.php1,404 ▲164.24 ▲0.0298.12 ▼11.5541.28 ▼7.46

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/onex-custom-popup-builder/templates/vue-templates/preset-page.php
    • > /wp-content/plugins/onex-custom-popup-builder/templates/vue-templates/preset-list.php
    • > /wp-content/plugins/onex-custom-popup-builder/templates/vue-templates/settings-page.php
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: overlay_html in wp-content/plugins/onex-custom-popup-builder/templates/popup-container.php on line 18
    • > PHP Notice
      Undefined variable: popup_json_data in wp-content/plugins/onex-custom-popup-builder/templates/popup-container.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/onex-custom-popup-builder/templates/vue-templates/preset-item.php:6
    • > PHP Notice
      Undefined variable: popup_settings_main in wp-content/plugins/onex-custom-popup-builder/templates/popup-container.php on line 23
    • > PHP Notice
      Undefined variable: popup_id in wp-content/plugins/onex-custom-popup-builder/templates/popup-container.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/onex-custom-popup-builder/templates/vue-templates/editor/condition-manager.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/onex-custom-popup-builder/templates/vue-templates/mailchimp-list-item.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/onex-custom-popup-builder/templates/vue-templates/preset-filters.php:3
    • > PHP Notice
      Undefined variable: popup_settings_main in wp-content/plugins/onex-custom-popup-builder/templates/popup-container.php on line 10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/onex-custom-popup-builder/templates/popup-container.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: animation effect, popup, custom popup builder, elementor addons, custom popup...

onex-custom-popup-builder/custom-popup-builder.php 92% from 13 tests

The main PHP script in "Onex Custom Popup Builder" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("onex-custom-popup-builder.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
There were no executable files found in this plugin41,758 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript148,1814,04134,591
PHP481,635276,286
SVG100870
JSON6006
CSS5005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.11
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes35
▷ Abstract classes25.71%
▷ Concrete classes3394.29%
▷ Final classes00.00%
Methods281
▷ Static methods248.54%
▷ Public methods27196.44%
▷ Protected methods103.56%
▷ 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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 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%
templates/dummy-popups/popup-4/thumbnail.png1.73KB1.38KB▼ 20.00%
templates/dummy-popups/popup-2/thumbnail.png1.84KB1.44KB▼ 21.73%
templates/dummy-popups/popup-1/thumbnail.png1.69KB1.38KB▼ 18.07%
templates/dummy-popups/popup-6/thumbnail.png1.78KB1.39KB▼ 21.80%