79% wp-private-comment-notes

Code Review | WP Private Comment Notes

WordPress plugin WP Private Comment Notes scored 79% from 54 tests.

About plugin

  • Plugin page: wp-private-commen...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 6, 2016
  • Latest release: Dec 9, 2018
  • Number of updates: 8
  • Update frequency: every 95.5 days
  • Top authors: EngageWP (87.5%)renventura (25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 782 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.80ms] Passed 4 tests

This is a short check of server-side resources used by WP Private Comment Notes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.27 ▼3.38
Dashboard /wp-admin3.36 ▲0.0542.60 ▼2.82
Posts /wp-admin/edit.php3.41 ▲0.0546.92 ▲3.16
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.48 ▲0.94
Media Library /wp-admin/upload.php3.28 ▲0.0536.00 ▲2.08

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Private Comment Notes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.151.84 ▲0.2444.24 ▼1.85
Dashboard /wp-admin2,209 ▲214.82 ▼1.08108.70 ▲5.7939.24 ▼4.85
Posts /wp-admin/edit.php2,086 ▼02.06 ▼0.0936.36 ▲0.3535.89 ▲2.92
Add New Post /wp-admin/post-new.php1,535 ▲2123.33 ▲5.59632.66 ▼39.8450.61 ▼1.28
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.0598.41 ▼4.4742.17 ▼3.21

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-private-comment-notes/templates/list-notes.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-private-comment-notes/templates/email.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-private-comment-notes/templates/note-li.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-private-comment-notes/templates/note-li.php on line 8
    • > PHP Notice
      Undefined variable: notes in wp-content/plugins/wp-private-comment-notes/templates/list-notes.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-private-comment-notes/templates/note-form.php:2
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/wp-private-comment-notes/templates/email.php on line 2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-private-comment-notes/templates/list-notes.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-private-comment-notes/templates/no-notes.php:2
    • > PHP Notice
      Undefined variable: note in wp-content/plugins/wp-private-comment-notes/templates/note-li.php on line 8
    • > PHP Notice
      Undefined variable: note in wp-content/plugins/wp-private-comment-notes/templates/note-li.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
3 plugin tags: notes, comments, comment meta

wp-private-comment-notes/wp-private-comment-notes.php Passed 13 tests

The main PHP script in "WP Private Comment Notes" version 1.0.0 is automatically included on every request by WordPress
86 characters long description:
Add private notes to WordPress comments with an option to email the original commenter

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
No dangerous file extensions were detected348 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6108140230
JavaScript135278
Markdown116029
CSS12011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin