90% admin-dashboard

Code Review | Admin Dashboard

WordPress plugin Admin Dashboard scored 90% from 54 tests.

About plugin

  • Plugin page: admin-dashboard
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 5.9.2
  • First release: Aug 29, 2019
  • Latest release: Aug 29, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: libinprasanth (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,362 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Admin Dashboard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1454.79 ▲4.10
Dashboard /wp-admin3.30 ▼0.1118.94 ▼15.27
Posts /wp-admin/edit.php3.80 ▲0.1636.33 ▼5.98
Add New Post /wp-admin/post-new.php7.38 ▲0.4181.26 ▼1,175.10
Media Library /wp-admin/upload.php3.49 ▲0.1921.30 ▼5.11
Social Media /wp-admin/admin.php?page=dashboard-social3.4122.26
Dashboard Menus /wp-admin/admin.php?page=dashboard-dashboard-menus3.6125.55

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 2 new options
New WordPress options
dashboard_social
dashboard_dashboard_menus

Browser metrics Passed 4 tests

A check of browser resources used by Admin Dashboard
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,984 ▼1,76015.16 ▼0.656.84 ▲0.352.73 ▲0.60
Dashboard /wp-admin1,089 ▼1,7722.90 ▼3.3266.39 ▼69.34117.51 ▼41.68
Posts /wp-admin/edit.php2,738 ▲473.28 ▲0.0464.40 ▲0.89143.95 ▲3.60
Add New Post /wp-admin/post-new.php1,696 ▼6419.95 ▲2.69420.54 ▼9.02162.03 ▲5.71
Media Library /wp-admin/upload.php1,736 ▲415.56 ▲0.07136.36 ▼6.60184.04 ▲1.12
Social Media /wp-admin/admin.php?page=dashboard-social1,2302.7655.72130.27
Dashboard Menus /wp-admin/admin.php?page=dashboard-dashboard-menus15,1443.4179.65144.28

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
  • The uninstall procedure has failed, leaving 2 options in the database
    • dashboard_social
    • dashboard_dashboard_menus

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: dashboard, admin dashboard, admin

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

The entry point to "Admin Dashboard" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("admin-dashboard.php" instead of "dashboard.php")

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
Good job! No executable or dangerous file extensions detected5,161 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG1132,624
CSS510642,117
PHP65254356
JavaScript18264

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.44
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin