72% wp-visitorflow

Code Review | WP VisitorFlow

WordPress plugin WP VisitorFlow scored 72% from 54 tests.

About plugin

  • Plugin page: wp-visitorflow
  • Plugin version: 1.6.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2016
  • Latest release: Feb 8, 2021
  • Number of updates: 109
  • Update frequency: every 16.6 days
  • Top authors: Friese (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 11,518 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼2.39ms] Passed 4 tests

Server-side resources used by WP VisitorFlow
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1042.58 ▼2.45
Dashboard /wp-admin3.57 ▲0.2644.08 ▼5.30
Posts /wp-admin/edit.php3.65 ▲0.2947.20 ▼6.21
Add New Post /wp-admin/post-new.php6.12 ▲0.2296.48 ▲4.42
Media Library /wp-admin/upload.php3.46 ▲0.2347.14 ▲13.72
Full Website /wp-admin/admin.php?page=wpvf_mode_website3.4656.84
Single Page /wp-admin/admin.php?page=wpvf_mode_singlepage3.4831.70
Overview /wp-admin/admin.php?page=wpvf_menu3.4333.61
Data Export /wp-admin/admin.php?page=wpvf_admin_export3.4832.39
Settings /wp-admin/admin.php?page=wpvf_admin_settings3.5732.49

Server storage [IO: ▲2.76MB] [DB: ▲0.01MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • Illegal file modification detected: 2 files (0.00KB) outside of "wp-content/plugins/wp-visitorflow/" and "wp-content/uploads/"
    • (new file) wp-content/extensions/wp-visitorflow/cache/.empty
    • (new file) wp-content/extensions/wp-visitorflow/export/.empty
Filesystem: 198 new files
Database: 5 new tables, 8 new options
New tables
wp_visitorflow_meta
wp_visitorflow_visits
wp_visitorflow_pages
wp_visitorflow_flow
wp_visitorflow_aggregation
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
wp_visitorflow_plugin_version
db_upgraded
wp_visitorflow
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP VisitorFlow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲20913.74 ▼0.841.76 ▼0.3942.63 ▼9.82
Dashboard /wp-admin2,382 ▲1975.03 ▼0.12104.17 ▼9.1042.91 ▼1.32
Posts /wp-admin/edit.php2,149 ▲572.04 ▲0.0436.56 ▼7.2337.85 ▲1.45
Add New Post /wp-admin/post-new.php1,550 ▲1422.29 ▼0.77712.84 ▲54.2856.19 ▼0.54
Media Library /wp-admin/upload.php1,433 ▲484.20 ▲0.03127.42 ▲19.8057.32 ▲11.05
Full Website /wp-admin/admin.php?page=wpvf_mode_website1,3442.2135.6433.17
Single Page /wp-admin/admin.php?page=wpvf_mode_singlepage1,0201.9227.0625.96
Overview /wp-admin/admin.php?page=wpvf_menu1,8403.1680.3245.29
Data Export /wp-admin/admin.php?page=wpvf_admin_export8652.0726.2522.43
Settings /wp-admin/admin.php?page=wpvf_admin_settings1,3552.0626.0837.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% 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)
These server-side errors were triggered
  • 35 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpvf_menu
    • > Notice in wp-content/plugins/wp-visitorflow/includes/views/tables/table-dbinfo.php+94
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=wpvf_mode_singlepage
    • > Notice in wp-content/plugins/wp-visitorflow/includes/classes/class-wp-visitorflow-admin-single.php+122
    Trying to get property 'title' of non-object
    • > GET request to /wp-admin/admin.php?page=wpvf_mode_singlepage
    • > Notice in wp-content/plugins/wp-visitorflow/includes/classes/class-wp-visitorflow-admin-single.php+124
    Trying to get property 'f_post_id' of non-object

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 fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-visitorflow/vendor/mustangostang/spyc/examples/yaml-load.php
    • > /wp-content/plugins/wp-visitorflow/vendor/mustangostang/spyc/php4/5to4.php
  • 79× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Doctrine\\Common\\Cache\\CacheProvider' not found in wp-content/plugins/wp-visitorflow/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Doctrine\\Common\\Cache\\CacheProvider' not found in wp-content/plugins/wp-visitorflow/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function setQueries() on null in wp-content/plugins/wp-visitorflow/includes/views/analysis/website-visitors.php:20
    • > PHP Notice
      Undefined variable: timeframePage in wp-content/plugins/wp-visitorflow/includes/views/analysis/single-timeline.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'DeviceDetector\\Parser\\Device\\AbstractDeviceParser' not found in wp-content/plugins/wp-visitorflow/vendor/matomo/device-detector/Parser/Device/Camera.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Doctrine\\Common\\Cache\\CacheProvider' not found in wp-content/plugins/wp-visitorflow/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php:33
    • > PHP Notice
      Undefined variable: db in wp-content/plugins/wp-visitorflow/includes/views/analysis/website-single-flow.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'DeviceDetector\\Parser\\Client\\AbstractClientParser' not found in wp-content/plugins/wp-visitorflow/vendor/matomo/device-detector/Parser/Client/PIM.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'DeviceDetector\\Parser\\Client\\AbstractClientParser' not found in wp-content/plugins/wp-visitorflow/vendor/matomo/device-detector/Parser/Client/Library.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'DeviceDetector\\Parser\\Client\\AbstractClientParser' not found in wp-content/plugins/wp-visitorflow/vendor/matomo/device-detector/Parser/Client/MediaPlayer.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: A description for screenshot #5 is missing in wp-visitorflow/assets to your readme.txt
The official readme.txt is a good inspiration

wp-visitorflow/wp-visitorflow.php Passed 13 tests

The main file in "WP VisitorFlow" v. 1.6.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
71 characters long description:
Detailed web analytics and visualization of your website's visitor flow

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin57,197 lines of code in 166 files:
LanguageFilesBlank linesComment linesLines of code
YAML192,1161,47422,673
JavaScript201,4133,43717,131
PHP1152,8495,31413,490
PO File29411,7282,082
CSS7100671,522
JSON100191
Ant113097
Markdown15011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.30
▷ Minimum class complexity1.00
▷ Maximum class complexity263.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces10
Interfaces7
Traits0
Classes74
▷ Abstract classes68.11%
▷ Concrete classes6891.89%
▷ Final classes00.00%
Methods549
▷ Static methods9817.85%
▷ Public methods30555.56%
▷ Protected methods17431.69%
▷ Private methods7012.75%
Functions29
▷ Named functions2689.66%
▷ Anonymous functions310.34%
Constants42
▷ Global constants49.52%
▷ Class constants3890.48%
▷ Public constants38100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/Arrow-4p.png1.15KB1.14KB▼ 0.94%
assets/images/tabicon_zoom_in.png1.00KB1.03KB0.00%
assets/images/Arrow-3m.png0.88KB0.52KB▼ 41.14%
assets/images/tabicon_zoom_out.png0.95KB0.94KB▼ 1.43%
assets/images/tabicon_all.png0.51KB0.39KB▼ 22.80%