84% vestacp-dashboard-widget

Code Review | VestaCP/myVesta Dashboard Widget

WordPress plugin VestaCP/myVesta Dashboard Widget scored84%from 54 tests.

About plugin

  • Plugin page: vestacp-dashboard...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: May 14, 2017
  • Latest release: Jul 22, 2023
  • Number of updates: 34
  • Update frequency: every 66.5 days
  • Top authors: SS88_UK (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,289 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by VestaCP/myVesta Dashboard Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.93 ▲1.86
Dashboard /wp-admin3.34 ▲0.0451.25 ▼0.72
Posts /wp-admin/edit.php3.39 ▲0.0351.06 ▼2.39
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.60 ▲1.35
Media Library /wp-admin/upload.php3.26 ▲0.0337.31 ▲3.26

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

VestaCP/myVesta Dashboard Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13014.37 ▼0.211.85 ▲0.0242.80 ▼2.25
Dashboard /wp-admin2,300 ▲1235.69 ▲0.0194.32 ▼3.5748.01 ▲2.75
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0241.05 ▲3.9836.04 ▼3.25
Add New Post /wp-admin/post-new.php1,554 ▲1418.29 ▲0.23621.84 ▼5.3357.55 ▼6.93
Media Library /wp-admin/upload.php1,394 ▼64.22 ▼0.0297.30 ▼10.3944.01 ▼2.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vestacp-dashboard-widget/widget.php:70

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: vestacp, myvesta, bandwidth stats, disk usage, bandwidth...

vestacp-dashboard-widget/widget.php 92% from 13 tests

"VestaCP/myVesta Dashboard Widget" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("vestacp-dashboard-widget.php" instead of "widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected406 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS12916236
PHP17722126
JavaScript116044

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin