84% a-dashboard-notice

Code Review | A Dashboard Notice

WordPress plugin A Dashboard Notice scored84%from 54 tests.

About plugin

  • Plugin page: a-dashboard-notice
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7
  • WordPress version: 6.3.1
  • First release: May 12, 2014
  • Latest release: Dec 21, 2016
  • Number of updates: 9
  • Update frequency: every 106.1 days
  • Top authors: dlh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,559 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by A Dashboard Notice
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.76 ▼3.13
Dashboard /wp-admin3.34 ▲0.0349.63 ▲1.68
Posts /wp-admin/edit.php3.39 ▲0.0344.79 ▼9.00
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.04 ▼11.13
Media Library /wp-admin/upload.php3.27 ▲0.0336.12 ▼2.58
A Dashboard Notice /wp-admin/options-general.php?page=a_dashboard_notice3.2335.21

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

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

Browser metrics Passed 4 tests

A Dashboard Notice: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.131.91 ▲0.1144.56 ▼1.26
Dashboard /wp-admin2,193 ▲195.56 ▲0.0384.85 ▼4.0441.02 ▲4.45
Posts /wp-admin/edit.php2,104 ▲41.94 ▲0.0033.81 ▼6.0737.02 ▲0.48
Add New Post /wp-admin/post-new.php1,534 ▲823.14 ▼0.07708.25 ▲20.2456.11 ▲4.25
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.07107.05 ▼9.0547.75 ▲0.06
A Dashboard Notice /wp-admin/options-general.php?page=a_dashboard_notice7962.0027.0430.26

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_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 3× 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/a-dashboard-notice/lib/class-adn-settings.php:135
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/a-dashboard-notice/lib/notice.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/a-dashboard-notice/a-dashboard-notice.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
1 plugin tags: dashboard

a-dashboard-notice/a-dashboard-notice.php Passed 13 tests

The entry point to "A Dashboard Notice" version 0.2.0 is a PHP file that has certain tags in its header comment area
57 characters long description:
Display a notice in the WordPress Dashboard to all users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin133 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33235133

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods220.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
There were not PNG files found in your plugin