84% private-user-notes

Code Review | Private User Notes

WordPress plugin Private User Notes scored84%from 54 tests.

About plugin

  • Plugin page: private-user-notes
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Sep 3, 2023
  • Number of updates: 10
  • Update frequency: every 28.9 days
  • Top authors: mansurahamed (70%)iworksolo (40%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /916 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.32ms] Passed 4 tests

An overview of server-side resources used by Private User Notes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.66 ▼6.71
Dashboard /wp-admin3.35 ▲0.0451.51 ▲4.39
Posts /wp-admin/edit.php3.40 ▲0.0447.80 ▲1.19
Add New Post /wp-admin/post-new.php5.93 ▲0.04100.04 ▲2.81
Media Library /wp-admin/upload.php3.27 ▲0.0437.10 ▲3.97
Private User Notes /wp-admin/options-general.php?page=private_user_notes3.2332.17

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Private User Notes: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.19 ▼1.191.70 ▼0.3641.75 ▼10.30
Dashboard /wp-admin2,213 ▲225.86 ▼0.04107.54 ▲6.9142.69 ▼2.03
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0240.11 ▲4.9235.14 ▼0.33
Add New Post /wp-admin/post-new.php1,517 ▼1617.74 ▼5.54710.60 ▲18.2949.75 ▼19.07
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.0098.78 ▼4.9146.30 ▲1.12
Private User Notes /wp-admin/options-general.php?page=private_user_notes8232.0223.2225.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/private-user-notes/private_notes.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: user note, private page, frontend note, frontend, note...

private-user-notes/private_notes.php 85% from 13 tests

The main PHP script in "Private User Notes" version 1.0.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("private-user-notes.php" instead of "private_notes.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 234 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected153 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11893135
JavaScript10018

PHP code Passed 2 tests

An short overview of 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.36
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin