78% directadmin-dashboard

Code Review | DirectAdmin Dashboard

WordPress plugin DirectAdmin Dashboard scored78%from 54 tests.

About plugin

  • Plugin page: directadmin-dashb...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Jan 16, 2018
  • Number of updates: 11
  • Update frequency: every 64.4 days
  • Top authors: Wielands (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,358 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.61ms] Passed 4 tests

This is a short check of server-side resources used by DirectAdmin Dashboard
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.77 ▼5.40
Dashboard /wp-admin3.37 ▲0.0743.31 ▼5.86
Posts /wp-admin/edit.php3.49 ▲0.1351.48 ▲6.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0787.77 ▼5.49
Media Library /wp-admin/upload.php3.30 ▲0.0737.65 ▲6.76
DA Settings /wp-admin/options-general.php?page=da_wp3.2628.24

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for DirectAdmin Dashboard
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.35 ▼0.031.54 ▼0.2937.79 ▼5.05
Dashboard /wp-admin2,203 ▲295.68 ▲0.1696.45 ▲0.1542.43 ▼1.99
Posts /wp-admin/edit.php2,104 ▲11.98 ▼0.0344.02 ▲7.0337.49 ▲4.93
Add New Post /wp-admin/post-new.php1,529 ▲323.54 ▲0.42608.99 ▼76.0258.08 ▲6.63
Media Library /wp-admin/upload.php1,401 ▼24.18 ▲0.0197.14 ▼5.0640.50 ▼4.63
DA Settings /wp-admin/options-general.php?page=da_wp8022.0028.0831.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/directadmin-dashboard/directadmin-dashboard.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/directadmin-dashboard/templates/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/directadmin-dashboard/templates/da-dashboard.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === directadmin-dashboard === )
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

directadmin-dashboard/directadmin-dashboard.php 92% from 13 tests

This is the main PHP file of "DirectAdmin Dashboard" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin725 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6175278460
Bourne Shell13745157
PO File1181861
CSS18045
JavaScript1092

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity16.25
▷ Minimum class complexity3.00
▷ Maximum class complexity48.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin