78% custom-dashboard-messages

Code Review | Zedna Custom Dashboard Messages

WordPress plugin Zedna Custom Dashboard Messages scored78%from 54 tests.

About plugin

  • Plugin page: custom-dashboard-...
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.6.0
  • WordPress version: 6.3.1
  • First release: Mar 11, 2016
  • Latest release: Dec 22, 2020
  • Number of updates: 25
  • Update frequency: every 70.3 days
  • Top authors: zedna (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /3,521 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Zedna Custom Dashboard Messages
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1035.79 ▼7.04
Dashboard /wp-admin3.42 ▲0.0747.52 ▼12.35
Posts /wp-admin/edit.php3.53 ▲0.1747.37 ▲0.89
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.31 ▼11.27
Media Library /wp-admin/upload.php3.34 ▲0.1133.91 ▲1.88
Main message /wp-admin/edit.php?post_type=cd_message_1&page=cdsm_options3.2830.05
Dashboard Messages /wp-admin/edit.php?post_type=cd_message_13.3834.70
Add New /wp-admin/post-new.php?post_type=cd_message_13.4644.94

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Zedna Custom Dashboard Messages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲15713.71 ▼0.672.03 ▲0.0843.72 ▼1.22
Dashboard /wp-admin2,306 ▲1154.89 ▼0.01110.20 ▼4.5150.60 ▲3.55
Posts /wp-admin/edit.php2,117 ▲282.06 ▲0.0239.97 ▲2.0834.19 ▲4.15
Add New Post /wp-admin/post-new.php1,559 ▲2123.04 ▲4.88615.62 ▼22.0157.30 ▲3.38
Media Library /wp-admin/upload.php1,419 ▲344.37 ▲0.1893.61 ▼8.0442.07 ▼0.22
Main message /wp-admin/edit.php?post_type=cd_message_1&page=cdsm_options1,6586.67133.0960.80
Dashboard Messages /wp-admin/edit.php?post_type=cd_message_11,0932.0031.1928.22
Add New /wp-admin/post-new.php?post_type=cd_message_12,3657.65172.9462.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=cd_message_1&page=cdsm_options
    • > Notice in wp-content/plugins/custom-dashboard-messages/single-message.php+343
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-dashboard-messages/custom-dashboard.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/custom-dashboard-messages/single-message.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: user, message, custom, dashoard, admin

custom-dashboard-messages/custom-dashboard.php 92% from 13 tests

The entry point to "Zedna Custom Dashboard Messages" version 2.2.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-dashboard-messages.php" instead of "custom-dashboard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected486 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2140204445
PO File1101241

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.33MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png107.58KB29.93KB▼ 72.18%
assets/icon-128x128.png21.25KB10.20KB▼ 52.03%
assets/screenshot-2.png13.78KB4.54KB▼ 67.02%
assets/icon-256x256.png92.21KB35.02KB▼ 62.02%
assets/banner-772x250.png92.46KB39.17KB▼ 57.64%