78% unbounce

Code Review | Unbounce Landing Pages

WordPress plugin Unbounce Landing Pages scored78%from 54 tests.

About plugin

  • Plugin page: unbounce
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.5-6.3
  • WordPress version: 6.3.1
  • First release: Jun 9, 2015
  • Latest release: Aug 14, 2023
  • Number of updates: 69
  • Update frequency: every 43.3 days
  • Top authors: unbouncewordpress (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

20,000+ active /329,247 total downloads

Benchmarks

Plugin footprint 82% 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.03MB] [CPU: ▼6.76ms] 75% from 4 tests

An overview of server-side resources used by Unbounce Landing Pages
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 701.11ms on /wp-admin/admin.php?page=unbounce-pages-diagnostics)
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.09 ▼0.38
Dashboard /wp-admin3.34 ▲0.0449.04 ▼7.40
Posts /wp-admin/edit.php3.39 ▲0.0450.12 ▼3.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.22 ▼14.46
Media Library /wp-admin/upload.php3.27 ▲0.0434.97 ▼1.47
Settings /wp-admin/admin.php?page=unbounce-pages-settings3.2934.76
Diagnostics /wp-admin/admin.php?page=unbounce-pages-diagnostics3.21701.11
Pages /wp-admin/admin.php?page=unbounce-pages3.3134.83

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 19 new options
New WordPress options
ub-api-client-id
ub-api-url
ub-page-server-domain
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
ub-proxy-error-message
ub-has-authorized
ub-domain-id
ub-user-id
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Unbounce Landing Pages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲15713.72 ▼0.521.94 ▲0.2744.82 ▲1.83
Dashboard /wp-admin2,299 ▲965.34 ▼0.57116.12 ▲14.2640.39 ▼2.63
Posts /wp-admin/edit.php2,185 ▲852.43 ▲0.4639.42 ▲3.4034.96 ▼1.30
Add New Post /wp-admin/post-new.php1,563 ▲923.46 ▲5.10668.32 ▲55.6037.63 ▼21.42
Media Library /wp-admin/upload.php1,478 ▲784.58 ▲0.28113.33 ▲10.3747.37 ▲1.01
Settings /wp-admin/admin.php?page=unbounce-pages-settings9241.9528.1729.15
Diagnostics /wp-admin/admin.php?page=unbounce-pages-diagnostics1,0661.9424.2332.36
Pages /wp-admin/admin.php?page=unbounce-pages9031.9727.5726.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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
    • > GET request to /wp-admin/admin.php?page=unbounce-pages-diagnostics
    • > Notice in wp-content/plugins/unbounce/UBDiagnostics.php+128
    Only variables should be passed by reference

SRP 50% 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
Please fix the following
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'UBTemplate' not found in wp-content/plugins/unbounce/templates/main_unauthorized.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/unbounce/templates/title.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/unbounce/templates/authorize_button.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'UBConfig' not found in wp-content/plugins/unbounce/templates/main.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/unbounce/templates/main_authorized_footer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_submit_button() in wp-content/plugins/unbounce/templates/main_authorized.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_submit_Button() in wp-content/plugins/unbounce/templates/main_failed_authorization.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'UBTemplate' not found in wp-content/plugins/unbounce/templates/diagnostics.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'UBWPListTable' not found in wp-content/plugins/unbounce/UBPageTable.php:3
    • > PHP Notice
      Undefined variable: permalink_url in wp-content/plugins/unbounce/templates/diagnostics.php on line 31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt is a good inspiration

unbounce/Unbounce-Page.php 92% from 13 tests

"Unbounce Landing Pages" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("unbounce.php" instead of "Unbounce-Page.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,883 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP244746222,653
JavaScript52311153
CSS117077

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity24.10
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods152
▷ Static methods10569.08%
▷ Public methods10871.05%
▷ Protected methods2113.82%
▷ Private methods2315.13%
Functions30
▷ Named functions26.67%
▷ Anonymous functions2893.33%
Constants29
▷ Global constants517.24%
▷ Class constants2482.76%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/unbounce-logo-white.png21.69KB4.45KB▼ 79.48%
img/unbounce-logo-blue.png4.31KB2.17KB▼ 49.52%