10% uvisualize

Code Review | UVisualize!

WordPress plugin UVisualize! scored10%from 54 tests.

About plugin

  • Plugin page: uvisualize
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Jan 21, 2016
  • Latest release: Feb 16, 2018
  • Number of updates: 9
  • Update frequency: every 93.0 days
  • Top authors: claireschlamm (88.89%)pampfelimetten (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /922 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'UVis_Plugin' not found

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.93ms] Passed 4 tests

A check of server-side resources used by UVisualize!
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.46 ▼2.32
Dashboard /wp-admin3.34 ▼0.0045.12 ▼14.49
Posts /wp-admin/edit.php3.40 ▲0.0447.12 ▲0.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.28 ▼11.74
Media Library /wp-admin/upload.php3.26 ▲0.0435.82 ▲1.31
Modules /wp-admin/admin.php?page=uvis-admin-modules3.2235.91
Settings /wp-admin/admin.php?page=uvis-options3.2129.98
UVisualize! /wp-admin/admin.php?page=uvis-admin3.2331.65

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 338 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
uvis_playlist_dropdown_number
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for UVisualize!
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲22814.51 ▲0.257.69 ▲5.9841.51 ▲1.99
Dashboard /wp-admin2,231 ▲455.08 ▼0.94115.28 ▲0.3742.66 ▼1.01
Posts /wp-admin/edit.php2,118 ▲292.38 ▲0.3840.41 ▼0.4137.48 ▲0.37
Add New Post /wp-admin/post-new.php6,309 ▲4,78123.67 ▲0.32886.84 ▲246.1537.33 ▼10.58
Media Library /wp-admin/upload.php1,413 ▲254.46 ▲0.2295.60 ▼7.1042.97 ▼0.72
Modules /wp-admin/admin.php?page=uvis-admin-modules1,0192.1431.0527.99
Settings /wp-admin/admin.php?page=uvis-options1,0112.4443.1134.95
UVisualize! /wp-admin/admin.php?page=uvis-admin9642.0327.2930.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'UVis_Plugin' not found
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • uvis_playlist_dropdown_number
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=uvis-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=uvis-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=uvis-options
    • > Warning in wp-content/plugins/uvisualize/includes/uvis-options.php+547
    Invalid argument supplied for foreach()

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 13× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/uvisualize/modules/map/images/tick.php
    • > /wp-content/plugins/uvisualize/modules/map/images/play.php
    • > /wp-content/plugins/uvisualize/modules/map/images/Lmapmarker.php
    • > /wp-content/plugins/uvisualize/modules/map/images/default.php
    • > /wp-content/plugins/uvisualize/modules/map/images/speaker.php
    • > /wp-content/plugins/uvisualize/modules/map/images/wifi.php
    • > /wp-content/plugins/uvisualize/uvis.php
    • > /wp-content/plugins/uvisualize/modules/map/images/tent.php
    • > /wp-content/plugins/uvisualize/modules/map/images/tower.php
    • > /wp-content/plugins/uvisualize/modules/layers/images/layersarrow.php
  • 19× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/uvisualize/modules/playlist/templates/playlist.tpl.php on line 8
    • > PHP Notice
      Undefined index: col in wp-content/plugins/uvisualize/modules/map/images/speaker.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/uvisualize/theme_files/single-uvis_visualization.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uvisualize/modules/example/example.php:23
    • > PHP Notice
      Undefined variable: playlist_id in wp-content/plugins/uvisualize/modules/visualizer/templates/metabox.tpl.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uvisualize/modules/layers/layers.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uvisualize/modules/playlist/playlist.php:559
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/uvisualize/theme_files/archive-uvis_playlist.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/uvisualize/modules/visualizer/visualizer.php:1027
    • > PHP Notice
      Undefined variable: playlist_id in wp-content/plugins/uvisualize/modules/visualizer/templates/metabox.tpl.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=uvis-options
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=uvis-options 327:38 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=uvis-options
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=uvis-options:240:35)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=uvis-options
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

uvisualize/uvis.php 85% from 13 tests

The primary PHP file in "UVisualize!" version 1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("uvisualize.php" instead of "uvis.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected45,162 lines of code in 268 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1467,18715,71930,260
CSS453603009,581
PHP251,0229842,476
HTML2612478812
PO File2341438808
Markdown62280448
SVG807299
JSON800271
LESS2179207

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity46.80
▷ Minimum class complexity21.00
▷ Maximum class complexity89.00
Average method complexity5.02
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods58
▷ Static methods00.00%
▷ Public methods5594.83%
▷ Protected methods00.00%
▷ Private methods35.17%
Functions55
▷ Named functions55100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
25 PNG files occupy 0.21MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/timeline/css/themes/timeline-texture.png40.07KB44.06KB0.00%
modules/playlist/images/btn-trash.png1.28KB0.46KB▼ 64.03%
vendor/timeline/css/timeline@2x.png40.06KB22.30KB▼ 44.33%
vendor/leaflet-dev/images/marker-icon-2x.png3.94KB2.53KB▼ 35.71%
modules/playlist/images/btn-edit-playlist.png1.62KB0.65KB▼ 59.66%