78% wpdash-notes

Code Review | WPDash Notes

WordPress plugin WPDash Notes scored78%from 54 tests.

About plugin

  • Plugin page: wpdash-notes
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Nov 20, 2020
  • Latest release: Aug 24, 2023
  • Number of updates: 12
  • Update frequency: every 84.0 days
  • Top authors: wpformation (83.33%)NicolasKulka (25%)

Code review

54 tests

User reviews

17 reviews

Install metrics

2,000+ active /10,379 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼12.22ms] Passed 4 tests

Analyzing server-side resources used by WPDash Notes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.82 ▼0.48
Dashboard /wp-admin3.42 ▲0.0849.62 ▼14.00
Posts /wp-admin/edit.php3.47 ▲0.1151.18 ▼4.26
Add New Post /wp-admin/post-new.php5.96 ▲0.0889.66 ▼30.14
Media Library /wp-admin/upload.php3.28 ▲0.0539.38 ▲4.68
Add New /wp-admin/post-new.php?post_type=wpf_post_it3.4956.88
All Notes /wp-admin/edit.php?post_type=wpf_post_it3.4350.30

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WPDash Notes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲16114.73 ▲0.171.72 ▲0.2237.86 ▼4.04
Dashboard /wp-admin2,307 ▲1335.64 ▼0.0289.14 ▼1.1241.81 ▲1.13
Posts /wp-admin/edit.php2,148 ▲482.02 ▲0.0342.65 ▲4.0838.82 ▲0.57
Add New Post /wp-admin/post-new.php1,570 ▲4423.72 ▲0.21677.05 ▲55.0152.33 ▼0.77
Media Library /wp-admin/upload.php1,461 ▲614.26 ▲0.0997.63 ▼19.8244.43 ▼6.77
Add New /wp-admin/post-new.php?post_type=wpf_post_it2,9368.10211.5374.23
All Notes /wp-admin/edit.php?post_type=wpf_post_it1,7922.0137.2634.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • wrm_201efb5d26868fd501ab
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wpdash-notes/classes/dashboard-news.php
    • > /wp-content/plugins/wpdash-notes/wpdash-notes.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Trait 'WPF\\WPDash_Notes\\Singleton' not found in wp-content/plugins/wpdash-notes/classes/plugin.php on line 5
    • > PHP Warning
      Use of undefined constant WPDASH_NOTES_DIR - assumed 'WPDASH_NOTES_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpdash-notes/autoload.php on line 197
    • > PHP Warning
      Use of undefined constant WPDASH_NOTES_DIR - assumed 'WPDASH_NOTES_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpdash-notes/autoload.php on line 203

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
Please take inspiration from this readme.txt

wpdash-notes/wpdash-notes.php 85% from 13 tests

The main PHP script in "WPDash Notes" version 1.3.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,565 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP196389071,892
JavaScript44245177
JSON400170
PO File16872159
CSS339144
Markdown118023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity24.90
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods112
▷ Static methods3329.46%
▷ Public methods8273.21%
▷ Protected methods1210.71%
▷ Private methods1816.07%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants5
▷ Global constants5100.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
There are no PNG files in this plugin