61% ultimate-widgets-light

Code Review | Ultimate Widgets Light

WordPress plugin Ultimate Widgets Light scored 61% from 54 tests.

About plugin

  • Plugin page: ultimate-widgets-...
  • Plugin version: 1.5.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7
  • WordPress version: 5.9.2
  • First release: Jul 9, 2015
  • Latest release: Oct 21, 2016
  • Number of updates: 146
  • Update frequency: every 4.0 days
  • Top authors: Khothemes (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

900+ active / 62,666 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼2.09MB] [CPU: ▼342.40ms] Passed 4 tests

A check of server-side resources used by Ultimate Widgets Light
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.226.73 ▼43.35
Dashboard /wp-admin2.29 ▼1.116.15 ▼27.69
Posts /wp-admin/edit.php2.30 ▼1.345.66 ▼31.89
Add New Post /wp-admin/post-new.php2.29 ▼4.685.69 ▼1,266.65
Media Library /wp-admin/upload.php2.30 ▼1.005.06 ▼17.95
Menus /wp-admin/nav-menus.php2.305.41
Contact Us /wp-admin/admin.php?page=uwl_options-contact2.305.98
Upgrade  ➤ /wp-admin/admin.php?page=uwl_options-pricing2.306.86
Widgets /wp-admin/widgets.php2.306.17
Import / Export /wp-admin/admin.php?page=uwl_options&tab=82.305.79
Widgets /wp-admin/admin.php?page=uwl_options&tab=12.306.25
Custom CSS /wp-admin/admin.php?page=uwl_options&tab=72.304.96
Styling /wp-admin/admin.php?page=uwl_options&tab=22.304.90
Options Object /wp-admin/admin.php?page=uwl_options&tab=92.304.74
Freemius Debug [v.1.2.1] /wp-admin/admin.php?page=freemius2.309.51

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 582 new files
Database: no new tables, 16 new options
New WordPress options
fs_active_plugins
widget_uwl_text
uwl_options-transients
widget_uwl_about_me
redux_version_upgraded_from
widget_uwl_menu
widget_uwl_video
widget_uwl_mailchimp
uwl_options
fs_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Ultimate Widgets Light
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,023 ▲26516.38 ▲0.826.58 ▼0.152.21 ▼0.36
Dashboard /wp-admin3,129 ▲2717.03 ▲0.82123.00 ▼12.65170.07 ▲8.68
Posts /wp-admin/edit.php2,862 ▲1743.62 ▲0.3792.00 ▲28.55147.36 ▲3.09
Add New Post /wp-admin/post-new.php1,777 ▲8716.04 ▼5.42385.65 ▼66.72159.09 ▼0.37
Media Library /wp-admin/upload.php1,864 ▲1666.01 ▲0.48127.44 ▼13.04180.69 ▼6.25
Menus /wp-admin/nav-menus.php2,4013.9598.69137.78
Contact Us /wp-admin/admin.php?page=uwl_options-contact1,4014.3074.97127.96
Upgrade  ➤ /wp-admin/admin.php?page=uwl_options-pricing1,4074.4385.49126.88
Widgets /wp-admin/widgets.php2,61223.57548.34144.81
Import / Export /wp-admin/admin.php?page=uwl_options&tab=83,4005.87104.41190.38
Widgets /wp-admin/admin.php?page=uwl_options&tab=13,4006.01108.72190.40
Custom CSS /wp-admin/admin.php?page=uwl_options&tab=73,4466.15127.54238.27
Styling /wp-admin/admin.php?page=uwl_options&tab=24,0375.26142.13196.22
Options Object /wp-admin/admin.php?page=uwl_options&tab=93,4005.72104.25157.82
Freemius Debug [v.1.2.1] /wp-admin/admin.php?page=freemius1,4103.2461.48151.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/ultimate-widgets-light/assets/admin/redux-core/inc/class.redux_filesystem.php+29
    Creating default object from empty value
  • This plugin does not fully uninstall, leaving 16 options in the database
    • widget_uwl_instagram
    • widget_uwl_menu
    • fs_api_cache
    • uwl_options
    • uwl_options-transients
    • fs_active_plugins
    • fs_accounts
    • fs_debug_mode
    • redux_version_upgraded_from
    • widget_uwl_video
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 31 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Warning in wp-content/plugins/ultimate-widgets-light/assets/admin/redux-core/inc/class.redux_filesystem.php+29
    Creating default object from empty value

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
The following issues need your attention
  • 33× 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/ultimate-widgets-light/assets/admin/redux-core/templates/panel/footer.tpl.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-widgets-light/assets/admin/redux-core/inc/class.p.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Redux_Customizer_Control' not found in wp-content/plugins/ultimate-widgets-light/assets/admin/redux-core/inc/extensions/customizer/inc/customizer_fields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/ultimate-widgets-light/assets/admin/templates/footer.tpl.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/ultimate-widgets-light/assets/admin/redux-core/inc/themecheck/checks/full_package.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ultimate-widgets-light/assets/admin/redux-core/inc/welcome/views/extensions.php:64
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/ultimate-widgets-light/assets/walker-nav.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ultimate-widgets-light/assets/admin/redux-core/inc/welcome/views/support.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ultimate-widgets-light/assets/admin/redux-core/inc/fields/select/elusive-icons.php:312
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ultimate-widgets-light/widgets/widget-text.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=uwl_options-contact
    • > Network (severe)
    https://wp.freemius.com/contact/?page=uwl_options-contact&plugin_id=286&plugin_public_key=pk_0ac879dbcb2b339fe7c26c9b9ac3f&plugin_version=1.5.9.4&wp_login_url=http%3A%2F%2Fwp.com%2Fwp-login.php&site_url=http%3A%2F%2Fwp.com#http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Duwl_options-contact - Failed to load resource: the server responded with a status of 500 ()
    • > GET request to /wp-admin/admin.php?page=uwl_options-pricing
    • > Network (severe)
    https://wp.freemius.com/pricing/?plugin_id=286&plugin_public_key=pk_0ac879dbcb2b339fe7c26c9b9ac3f&plugin_version=1.5.9.4&page=uwl_options-pricing&next=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Ffs_action%3Dultimate-widgets-light_sync_license%26page%3Duwl_options-account&billing_cycle=annual#http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Duwl_options-pricing - Failed to load resource: the server responded with a status of 500 ()

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 70 tag instead of maximum 10
The official readme.txt might help

ultimate-widgets-light/functions.php 77% from 13 tests

The entry point to "Ultimate Widgets Light" version 1.5.9.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ultimate-widgets-light.php" instead of "functions.php")
  • Description: The description should be shorter than 140 characters (currently 144 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin63,051 lines of code in 435 files:
LanguageFilesBlank linesComment linesLines of code
PHP1937,46713,17831,868
JavaScript942,6342,04911,853
Sass648651407,069
PO File52,9774,5614,793
SVG3003,286
CSS673682552,303
JSON31840951
LESS38279715
Markdown1590191
YAML22022

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 149)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity35.14
▷ Minimum class complexity1.00
▷ Maximum class complexity943.00
Average method complexity5.05
▷ Minimum method complexity1.00
▷ Maximum method complexity149.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes152
▷ Abstract classes21.32%
▷ Concrete classes15098.68%
▷ Final classes00.00%
Methods1,306
▷ Static methods18714.32%
▷ Public methods98175.11%
▷ Protected methods1037.89%
▷ Private methods22217.00%
Functions71
▷ Named functions71100.00%
▷ Anonymous functions00.00%
Constants151
▷ Global constants7750.99%
▷ Class constants7449.01%
▷ Public constants74100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
35 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/redux-core/inc/fields/spinner/arrow_right.png0.15KB0.12KB▼ 18.18%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/admin/redux-core/assets/img/2-col-portfolio.png1.02KB0.15KB▼ 85.07%
assets/admin/redux-core/assets/img/1c.png0.13KB0.13KB▼ 0.72%
assets/images/about-avatar.png1.01KB1.10KB0.00%