10% dashylite

Code Review | Dashy - Google Analytics advanced dashboard

WordPress plugin Dashy - Google Analytics advanced dashboard scored 10% from 54 tests.

About plugin

  • Plugin page: dashylite
  • Plugin version: 2.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.3
  • WordPress version: 5.9.2
  • First release: Apr 27, 2017
  • Latest release: Nov 12, 2019
  • Number of updates: 261
  • Update frequency: every 3.6 days
  • Top authors: tropicalista (99.62%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 5,076 total downloads

Benchmarks

Plugin footprint 58% 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
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5768
    wpdb::prepare was called incorrectly. Unsupported value type (array). Please see Debugging in WordPress for more information. (This message was added in version 4.8.2.)

Server metrics [RAM: ▲3.53MB] [CPU: ▼291.17ms] Passed 4 tests

An overview of server-side resources used by Dashy - Google Analytics advanced dashboard
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /7.90 ▲4.3976.30 ▲26.01
Dashboard /wp-admin7.92 ▲4.5256.81 ▲24.15
Posts /wp-admin/edit.php7.92 ▲4.2858.16 ▲21.15
Add New Post /wp-admin/post-new.php7.92 ▲0.9251.19 ▼1,229.96
Media Library /wp-admin/upload.php7.92 ▲4.6345.60 ▲19.97
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius7.9243.22

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 381 new files
Database: 1 new table, 13 new options
New tables
wp_dashy_dashboard
New WordPress options
dashy_credentials
fs_gdpr
dashy_installed
fs_accounts
dashy_settings
fs_active_plugins
dashy_token
dashy_widgets
fs_debug_mode
fs_api_cache
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dashy - Google Analytics advanced dashboard
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,821 ▲7715.64 ▼0.037.02 ▲1.432.44 ▲0.30
Dashboard /wp-admin2,943 ▲896.12 ▼0.13117.24 ▼13.28171.64 ▲10.94
Posts /wp-admin/edit.php2,770 ▲764.04 ▲0.80107.19 ▲41.40177.85 ▲36.31
Add New Post /wp-admin/post-new.php1,734 ▼2620.79 ▼1.75483.53 ▲50.87167.02 ▲17.77
Media Library /wp-admin/upload.php1,749 ▲515.61 ▲0.06141.00 ▼0.18208.84 ▲24.44
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius1,4892.5152.84127.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 5 options
    • fs_active_plugins
    • fs_api_cache
    • fs_gdpr
    • fs_debug_mode
    • fs_accounts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dashylite/freemius/templates/ajax-loader.php
  • 80× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/dashylite/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/dashylite/vendor/guzzlehttp/psr7/src/DroppingStream.php:10
    • > PHP Warning
      require(wp-content/plugins/dashylite/vendor/league/oauth2-google/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/dashylite/vendor/league/oauth2-google/examples/provider.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/dashylite/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/dashylite/vendor/guzzlehttp/psr7/src/LimitStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/dashylite/vendor/guzzlehttp/psr7/src/Stream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\OAuth2\\Client\\OptionProvider\\OptionProviderInterface' not found in wp-content/plugins/dashylite/vendor/league/oauth2-client/src/OptionProvider/PostAuthOptionProvider.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/dashylite/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/dashylite/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'Tropicalista\\Dashy\\Rest\\Base_Rest' not found in wp-content/plugins/dashylite/includes/Rest/Rest_Config.php:7

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: event tracking, google analytics widget, google analytics, search console, analytics...

dashylite/dashylite.php 92% from 13 tests

The main file in "Dashy - Google Analytics advanced dashboard" v. 2.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected57,414 lines of code in 332 files:
LanguageFilesBlank linesComment linesLines of code
PHP2619,15722,39639,019
PO File105,7106,91312,558
Markdown181,38103,923
JSON910781
JavaScript93761658
CSS222864388
SVG145057
XML10028
Bourne Shell1102

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,609)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity28.84
▷ Minimum class complexity1.00
▷ Maximum class complexity2,609.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces19
Interfaces18
Traits9
Classes149
▷ Abstract classes42.68%
▷ Concrete classes14597.32%
▷ Final classes128.28%
Methods1,974
▷ Static methods24012.16%
▷ Public methods1,45473.66%
▷ Protected methods794.00%
▷ Private methods44122.34%
Functions255
▷ Named functions16564.71%
▷ Anonymous functions9035.29%
Constants188
▷ Global constants10555.85%
▷ Class constants8344.15%
▷ Public constants83100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/dashylite.png2.98KB1.13KB▼ 62.16%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%