58% unique-ux

Code Review | Unique UX

WordPress plugin Unique UX scored58%from 54 tests.

About plugin

  • Plugin page: unique-ux
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 22, 2016
  • Latest release: Oct 17, 2016
  • Number of updates: 6
  • Update frequency: every 14.7 days
  • Top authors: awcode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /682 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.49MB] [CPU: ▲1.32ms] Passed 4 tests

Analyzing server-side resources used by Unique UX
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5252.23 ▲10.60
Dashboard /wp-admin3.83 ▲0.5246.97 ▼3.03
Posts /wp-admin/edit.php3.88 ▲0.5249.27 ▲0.60
Add New Post /wp-admin/post-new.php6.35 ▲0.4686.84 ▼0.12
Media Library /wp-admin/upload.php3.69 ▲0.4542.93 ▲7.81
Settings /wp-admin/admin.php?page=uniqueux_settings3.6939.80
Unique Ux /wp-admin/admin.php?page=uniqueux3.6849.46
User group /wp-admin/admin.php?page=uniqueux_user_group3.6634.36
Content group /wp-admin/admin.php?page=uniqueux_content_group3.6939.27

Server storage [IO: ▲0.56MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: 6 new tables, 7 new options
New tables
wp_uniqueux_content_group
wp_uniqueux_content
wp_uniqueux_devices
wp_uniqueux_visitors
wp_uniqueux_user_group
wp_uniqueux_schedule
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_uniqueux_widget
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Unique UX
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲18213.59 ▼0.788.39 ▲6.3142.83 ▼3.68
Dashboard /wp-admin2,242 ▲515.82 ▲0.9098.56 ▼12.7575.90 ▲32.21
Posts /wp-admin/edit.php2,125 ▲362.02 ▲0.0134.34 ▼2.3532.99 ▼0.86
Add New Post /wp-admin/post-new.php6,478 ▲4,94528.51 ▲5.331,009.52 ▲332.6961.68 ▼9.93
Media Library /wp-admin/upload.php1,418 ▲394.07 ▼0.21100.80 ▼4.6079.77 ▲34.43
Settings /wp-admin/admin.php?page=uniqueux_settings1,1043.1043.6735.54
Unique Ux /wp-admin/admin.php?page=uniqueux1,8741.6827.5532.81
User group /wp-admin/admin.php?page=uniqueux_user_group9972.0324.6625.58
Content group /wp-admin/admin.php?page=uniqueux_content_group1,1433.1444.7664.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/unique-ux/unique-ux.php+470
    Undefined index: uniqueux_visitor
  • Zombie tables were found after uninstall: 6 tables
    • wp_uniqueux_user_group
    • wp_uniqueux_schedule
    • wp_uniqueux_content
    • wp_uniqueux_content_group
    • wp_uniqueux_visitors
    • wp_uniqueux_devices
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_uniqueux_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unique-ux/includes/class-uniqueux-meta-boxes.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/unique-ux/includes/class-uniqueux-dashboard-table.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/unique-ux/includes/class-uniqueux-widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=uniqueux_content_group
    • > Javascript (severe) in unknown
    /wp-content/plugins/unique-ux/plugins/js/bootstrap.min.js?ver=6.3.1 5:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Plugin layout with all options enabled.) image missing
The official readme.txt is a good inspiration

unique-ux/unique-ux.php 92% from 13 tests

"Unique UX" version 0.9.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin4,819 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP117201043,005
JavaScript6168611,506
SVG100288
CSS432620

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity10.64
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods68
▷ Static methods45.88%
▷ Public methods5682.35%
▷ Protected methods00.00%
▷ Private methods1217.65%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png3.62KB0.85KB▼ 76.55%