84% wp-dashboard-messages

Code Review | WP Dashboard Messages

WordPress plugin WP Dashboard Messages scored84%from 54 tests.

About plugin

  • Plugin page: wp-dashboard-mess...
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: May 12, 2020
  • Latest release: May 3, 2023
  • Number of updates: 11
  • Update frequency: every 98.7 days
  • Top authors: podpirate (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /2,950 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.03MB] [CPU: ▼6.02ms] Passed 4 tests

Server-side resources used by WP Dashboard Messages
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.96 ▼4.45
Dashboard /wp-admin3.35 ▲0.0145.93 ▼11.50
Posts /wp-admin/edit.php3.47 ▲0.1244.96 ▲2.36
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.13 ▼10.48
Media Library /wp-admin/upload.php3.28 ▲0.0636.33 ▲5.37
All Messages /wp-admin/edit.php?post_type=dashboard_message3.3334.21
Add New /wp-admin/post-new.php?post_type=dashboard_message3.5051.80

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Dashboard Messages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.23 ▼0.121.67 ▲0.0138.28 ▼1.25
Dashboard /wp-admin2,226 ▲495.55 ▼0.0484.25 ▼9.0637.31 ▼8.90
Posts /wp-admin/edit.php2,131 ▲311.98 ▲0.0135.76 ▼0.0533.90 ▼2.51
Add New Post /wp-admin/post-new.php1,555 ▲2923.18 ▲0.17661.56 ▲22.0855.30 ▲3.80
Media Library /wp-admin/upload.php1,501 ▲1014.19 ▼0.0898.38 ▼2.4741.90 ▼0.82
All Messages /wp-admin/edit.php?post_type=dashboard_message1,1111.9633.0327.69
Add New /wp-admin/post-new.php?post_type=dashboard_message3,8247.70189.6566.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 10× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-dashboard-messages/include/DashboardMessages/Core/Singleton.php
    • > /wp-content/plugins/wp-dashboard-messages/include/DashboardMessages/PostType/PostType.php
    • > /wp-content/plugins/wp-dashboard-messages/include/autoload.php
    • > /wp-content/plugins/wp-dashboard-messages/include/DashboardMessages/Core/Plugin.php
    • > /wp-content/plugins/wp-dashboard-messages/include/DashboardMessages/PostType/PostTypeDashboardMessage.php
    • > /wp-content/plugins/wp-dashboard-messages/include/DashboardMessages/Core/PluginComponent.php
    • > /wp-content/plugins/wp-dashboard-messages/include/DashboardMessages/Core/Core.php
    • > /wp-content/plugins/wp-dashboard-messages/include/DashboardMessages/Admin/Admin.php
    • > /wp-content/plugins/wp-dashboard-messages/include/DashboardMessages/Compat/WPMU.php
    • > /wp-content/plugins/wp-dashboard-messages/index.php

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: admin, dashboard

wp-dashboard-messages/index.php 92% from 13 tests

The main file in "WP Dashboard Messages" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-dashboard-messages.php" instead of "index.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
Good job! No executable or dangerous file extensions detected1,731 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP113264391,044
JSON100334
PO File2138200306
JavaScript21443
CSS4024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.75
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes8
▷ Abstract classes337.50%
▷ Concrete classes562.50%
▷ Final classes00.00%
Methods70
▷ Static methods57.14%
▷ Public methods5882.86%
▷ Protected methods912.86%
▷ Private methods34.29%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ 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
PNG images were not found in this plugin