72% digirisk-dashboard

Code Review | Digirisk Dashboard

WordPress plugin Digirisk Dashboard scored 72% from 54 tests.

About plugin

  • Plugin page: digirisk-dashboard
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2017
  • Latest release: Oct 2, 2020
  • Number of updates: 10
  • Update frequency: every 102.3 days
  • Top authors: Evarisk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 927 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.56MB] [CPU: ▼16.07ms] Passed 4 tests

This is a short check of server-side resources used by Digirisk Dashboard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.75 ▲1.2941.78 ▼2.84
Dashboard /wp-admin4.32 ▲1.0129.80 ▼19.98
Posts /wp-admin/edit.php4.75 ▲1.3958.97 ▲11.31
Add New Post /wp-admin/post-new.php4.51 ▼1.3845.59 ▼52.77
Media Library /wp-admin/upload.php4.56 ▲1.3348.63 ▲13.82
Tableau de bord /wp-admin/admin.php?page=go-to-wp-admin4.5040.25
Ajouter un site /wp-admin/admin.php?page=digirisk-dashboard-add4.4942.24
DUER Multisite /wp-admin/admin.php?page=digirisk-dashboard-duer4.4940.45
Minimize menu /wp-admin/admin.php?page=minimize-menu4.5039.37
Modèles ODT /wp-admin/admin.php?page=digirisk-dashboard-model4.4937.88
DigiRisk Dashboard /wp-admin/admin.php?page=digirisk-dashboard4.4939.83

Server storage [IO: ▲4.81MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 443 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Digirisk Dashboard
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,572 ▼17413.67 ▼0.629.32 ▲7.4236.70 ▼8.48
Dashboard /wp-admin1,890 ▼3015.81 ▲0.9298.32 ▼5.6373.51 ▲26.96
Posts /wp-admin/edit.php2,234 ▲1452.47 ▲0.4541.62 ▲2.5435.92 ▲3.09
Add New Post /wp-admin/post-new.php1,558 ▲4424.18 ▲6.83727.65 ▲50.9435.62 ▼20.34
Media Library /wp-admin/upload.php1,576 ▲1944.39 ▲0.1999.18 ▼2.8979.89 ▲35.27
Tableau de bord /wp-admin/admin.php?page=go-to-wp-admin7561.8425.9422.37
Ajouter un site /wp-admin/admin.php?page=digirisk-dashboard-add1,1053.4541.1356.05
DUER Multisite /wp-admin/admin.php?page=digirisk-dashboard-duer1,3283.5345.4729.99
Minimize menu /wp-admin/admin.php?page=minimize-menu7561.8326.9213.77
Modèles ODT /wp-admin/admin.php?page=digirisk-dashboard-model1,0143.4142.3259.79
DigiRisk Dashboard /wp-admin/admin.php?page=digirisk-dashboard1,0363.4542.1471.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=minimize-menu
    • > Notice in wp-content/plugins/digirisk-dashboard/core/external/eo-framework/modules/wpeo-custom-menu/class/class-custom-menu-handler.php+104
    Undefined index: logo
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=minimize-menu
    • > Notice in wp-content/plugins/digirisk-dashboard/core/external/eo-framework/modules/wpeo-custom-menu/class/class-custom-menu-handler.php+104
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=minimize-menu
    • > Notice in wp-content/plugins/digirisk-dashboard/core/external/eo-framework/modules/wpeo-custom-menu/view/content.view.php+36
    Uninitialized string offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=minimize-menu
    • > Warning in wp-content/plugins/digirisk-dashboard/core/external/eo-framework/modules/wpeo-custom-menu/view/content.view.php+39
    call_user_func() expects parameter 1 to be a valid callback, function '' not found or invalid function name
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=digirisk-dashboard
    • > Warning in wp-content/plugins/digirisk-dashboard/core/action/class-digirisk-dashboard-core-action.php+93
    Use of undefined constant PLUGIN_DIGIRISK_URL - assumed 'PLUGIN_DIGIRISK_URL' (this will throw an Error in a future version of PHP)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=digirisk-dashboard
    • > Notice in wp-content/plugins/digirisk-dashboard/core/action/class-digirisk-dashboard-core-action.php+93
    Undefined index: digirisk
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=digirisk-dashboard
    • > Notice in wp-content/plugins/digirisk-dashboard/core/action/class-digirisk-dashboard-core-action.php+93
    Trying to get property 'version' of non-object
    • > GET request to /wp-admin/admin.php?page=digirisk-dashboard-model
    • > Notice in wp-content/plugins/digirisk-dashboard/core/external/eo-framework/core/util/class-view-util.php+49
    Trying to get property 'handle_model' of non-object
    • > GET request to /wp-admin/admin.php?page=digirisk-dashboard-model
    • > Notice in wp-content/plugins/digirisk-dashboard/core/external/eo-framework/core/util/class-view-util.php+49
    Trying to get property 'path' of non-object

SRP 50% 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 trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function digirisk_dashboard\\plugins_url() in wp-content/plugins/digirisk-dashboard/digirisk_dashboard.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'eoxia\\View_Util' not found in wp-content/plugins/digirisk-dashboard/modules/model/view/items.view.php:29

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=digirisk-dashboard
    • > Network (severe)
    plugin_digirisk_urlcore/assets/css/style.css - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=digirisk-dashboard
    • > Network (severe)
    plugin_digirisk_urlcore/assets/js/backend.min.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=digirisk-dashboard
    • > Network (severe)
    plugin_digirisk_urlcore/assets/js/owl.carousel.min.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=digirisk-dashboard
    • > Network (severe)
    plugin_digirisk_urlcore/assets/js/autosize.min.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Dashboard) image required
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

digirisk-dashboard/digirisk_dashboard.php 92% from 13 tests

The main PHP script in "Digirisk Dashboard" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("digirisk-dashboard.php" instead of "digirisk_dashboard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected41,588 lines of code in 333 files:
LanguageFilesBlank linesComment linesLines of code
PHP1242,6016,1729,620
Sass1195221918,756
SVG3008,611
CSS131,0105446,308
JavaScript338712,2984,659
HTML19281361,922
PO File36359591,295
JSON1510240
Markdown41020177

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity16.88
▷ Minimum class complexity1.00
▷ Maximum class complexity553.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes81
▷ Abstract classes11.23%
▷ Concrete classes8098.77%
▷ Final classes00.00%
Methods369
▷ Static methods195.15%
▷ Public methods32186.99%
▷ Protected methods338.94%
▷ Private methods154.07%
Functions18
▷ Named functions633.33%
▷ Anonymous functions1266.67%
Constants66
▷ Global constants6598.48%
▷ Class constants11.52%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/images/favicon_hd.png2.80KB1.60KB▼ 43.03%
core/assets/images/sitemap.png0.35KB0.41KB0.00%