84% lh-dashboard-notes

Code Review | LH Dashboard Notes

WordPress plugin LH Dashboard Notes scored84%from 54 tests.

About plugin

  • Plugin page: lh-dashboard-notes
  • Plugin version: 1.09
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: May 9, 2018
  • Number of updates: 14
  • Update frequency: every 164.9 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

700+ active /8,684 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.18ms] Passed 4 tests

A check of server-side resources used by LH Dashboard Notes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.99 ▲0.42
Dashboard /wp-admin3.34 ▲0.0044.97 ▼22.07
Posts /wp-admin/edit.php3.39 ▲0.0451.43 ▲1.70
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.58 ▼20.35
Media Library /wp-admin/upload.php3.27 ▲0.0437.08 ▲1.29
Add New /wp-admin/post-new.php?post_type=lh-dashboard-note3.3845.57
All Notes /wp-admin/edit.php?post_type=lh-dashboard-note3.3135.02

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

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

Browser metrics Passed 4 tests

LH Dashboard Notes: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲5913.32 ▼1.304.90 ▲2.6843.39 ▲0.40
Dashboard /wp-admin2,233 ▲486.01 ▲1.13105.83 ▲0.1439.47 ▼7.44
Posts /wp-admin/edit.php2,116 ▲272.06 ▲0.0638.27 ▲3.2534.17 ▼0.01
Add New Post /wp-admin/post-new.php1,556 ▲4223.05 ▲5.40656.80 ▼40.0558.74 ▲2.33
Media Library /wp-admin/upload.php1,415 ▲274.24 ▲0.0597.24 ▼12.6043.80 ▼4.40
Add New /wp-admin/post-new.php?post_type=lh-dashboard-note2,1637.74184.1266.55
All Notes /wp-admin/edit.php?post_type=lh-dashboard-note1,0802.0129.3627.33

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/lh-dashboard-notes/lh-dashboard-notes.php:251

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

lh-dashboard-notes/lh-dashboard-notes.php 92% from 13 tests

"LH Dashboard Notes" version 1.09's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected122 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111633122

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/lh-dashboard-widgets-menuicon.png65.82KB0.70KB▼ 98.94%