82% application-insights-dashboard-beta

Code Review | Application Insights Dashboard Plugin

WordPress plugin Application Insights Dashboard Plugin scored 82% from 54 tests.

About plugin

  • Plugin page: application-insig...
  • Plugin version: 2.0a
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 5.8.1
  • First release: Jun 1, 2015
  • Latest release: Jun 25, 2015
  • Number of updates: 15
  • Update frequency: every 1.8 days
  • Top authors: vsacja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 786 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼149.00ms] Passed 4 tests

This is a short check of server-side resources used by Application Insights Dashboard Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2138.90 ▲16.76
Dashboard /wp-admin3.15 ▲0.0937.78 ▼11.09
Posts /wp-admin/edit.php3.24 ▲0.1334.73 ▼8.31
Add New Post /wp-admin/post-new.php5.51 ▲0.0883.91 ▼573.45
Media Library /wp-admin/upload.php3.10 ▲0.1031.34 ▼3.15
Application Insights Dashboard /wp-admin/options-general.php?page=appinsights3.2526.85

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 1 new option
New WordPress options
appinsights_options

Browser metrics Passed 4 tests

Application Insights Dashboard Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,789 ▲19316.56 ▲0.748.80 ▼1.6948.95 ▲2.17
Dashboard /wp-admin3,059 ▲1316.88 ▲0.90146.04 ▼30.38114.19 ▼12.83
Posts /wp-admin/edit.php2,744 ▲82.69 ▼0.0067.50 ▲1.7392.10 ▼10.90
Add New Post /wp-admin/post-new.php1,511 ▼7018.80 ▲0.76406.33 ▼21.78113.48 ▼7.77
Media Library /wp-admin/upload.php1,812 ▲55.02 ▲0.01167.26 ▼11.42125.60 ▼3.19
Application Insights Dashboard /wp-admin/options-general.php?page=appinsights1,1372.5657.1583.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=appinsights
    • > Notice in wp-content/plugins/application-insights-dashboard-beta/admin/appinsights-settings.php+40
    Undefined index: code

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/application-insights-dashboard-beta/appinsights.php
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/application-insights-dashboard-beta/admin/appinsights-ajax.php on line 51
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/application-insights-dashboard-beta/admin/appinsights-ajax.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/application-insights-dashboard-beta/appinsights-api.php:25
    • > PHP Notice
      Undefined variable: period in wp-content/plugins/application-insights-dashboard-beta/admin/appinsights-ajax.php on line 18
    • > PHP Notice
      Undefined variable: period in wp-content/plugins/application-insights-dashboard-beta/admin/appinsights-ajax.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/application-insights-dashboard-beta/appinsights-api.php on line 23
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/application-insights-dashboard-beta/admin/appinsights-ajax.php on line 47
    • > PHP Notice
      Undefined variable: period in wp-content/plugins/application-insights-dashboard-beta/admin/appinsights-ajax.php on line 22
    • > PHP Notice
      Undefined variable: query in wp-content/plugins/application-insights-dashboard-beta/admin/appinsights-ajax.php on line 38
    • > PHP Notice
      Undefined variable: period in wp-content/plugins/application-insights-dashboard-beta/admin/appinsights-ajax.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: windows azure, microsoft azure, application insights, appinsights

application-insights-dashboard-beta/appinsights.php 85% from 13 tests

"Application Insights Dashboard Plugin" version 2.0a's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("application-insights-dashboard-beta.php" instead of "appinsights.php")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "2.0a")

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
Everything looks great! No dangerous files found in this plugin13,792 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript103,52510,08711,965
PHP11228301,332
CSS2181152495

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.36
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods42
▷ Static methods511.90%
▷ Public methods3378.57%
▷ Protected methods00.00%
▷ Private methods921.43%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin