84% wp-dashboard-notes

Code Review | WP Dashboard Notes

WordPress plugin WP Dashboard Notes scored84%from 54 tests.

About plugin

  • Plugin page: wp-dashboard-notes
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 20, 2014
  • Latest release: Jun 6, 2022
  • Number of updates: 40
  • Update frequency: every 71.2 days
  • Top authors: sormano (100%)

Code review

54 tests

User reviews

103 reviews

Install metrics

30,000+ active /155,904 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.00MB] [CPU: ▼10.03ms] Passed 4 tests

Server-side resources used by WP Dashboard Notes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.94 ▼6.08
Dashboard /wp-admin3.34 ▲0.0450.25 ▼0.48
Posts /wp-admin/edit.php3.36 ▲0.0049.74 ▼5.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.69 ▼27.90
Media Library /wp-admin/upload.php3.23 ▲0.0037.84 ▲2.21

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Dashboard Notes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.30 ▼0.381.77 ▼0.2042.57 ▼0.45
Dashboard /wp-admin2,205 ▲285.75 ▲0.0584.44 ▼5.6139.77 ▼1.13
Posts /wp-admin/edit.php2,082 ▼212.08 ▲0.0641.77 ▲2.1836.96 ▲1.21
Add New Post /wp-admin/post-new.php1,549 ▲418.64 ▼4.56656.86 ▼9.5758.57 ▼5.79
Media Library /wp-admin/upload.php1,397 ▼34.33 ▲0.04101.09 ▼4.0044.39 ▲2.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-dashboard-notes/includes/templates/note.php:19
    • > PHP Notice
      Undefined variable: note_meta in wp-content/plugins/wp-dashboard-notes/includes/templates/note.php on line 1
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/wp-dashboard-notes/includes/templates/note.php on line 4
    • > PHP Notice
      Undefined variable: note_meta in wp-content/plugins/wp-dashboard-notes/includes/templates/note.php on line 13
    • > PHP Notice
      Undefined variable: note_meta in wp-content/plugins/wp-dashboard-notes/includes/templates/note-list.php on line 1
    • > PHP Notice
      Undefined variable: note in wp-content/plugins/wp-dashboard-notes/includes/templates/note-list.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-dashboard-notes/includes/templates/note-list.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-dashboard-notes/includes/templates/note.php on line 1
    • > PHP Notice
      Undefined variable: note_meta in wp-content/plugins/wp-dashboard-notes/includes/templates/note.php on line 1
    • > PHP Notice
      Undefined variable: note_meta in wp-content/plugins/wp-dashboard-notes/includes/templates/note-list.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (WordPress dashboard example), #2 (Add note button), #3 (Normal white note)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-dashboard-notes/wp-dashboard-notes.php Passed 13 tests

"WP Dashboard Notes" version 1.0.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
136 characters long description:
Working in a team? Want to make notes? You can do just that with WP Dashboard Notes. Create beautiful notes with a nice user experience.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,015 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP6182252392
Sass1180331
JavaScript37243171
PO File24370120
CSS1001

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.19
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.04MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png7.69KB7.83KB0.00%
screenshot-3.png4.84KB4.89KB0.00%
screenshot-1.png27.95KB28.23KB0.00%