84% admin-private-note-on-users

Code Review | Admin Private Note on users

WordPress plugin Admin Private Note on users scored84%from 54 tests.

About plugin

  • Plugin page: admin-private-not...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Jun 20, 2015
  • Latest release: Apr 12, 2017
  • Number of updates: 19
  • Update frequency: every 35.2 days
  • Top authors: wplizer (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /1,766 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.67ms] Passed 4 tests

This is a short check of server-side resources used by Admin Private Note on users
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.57 ▼6.06
Dashboard /wp-admin3.32 ▲0.0248.06 ▼1.17
Posts /wp-admin/edit.php3.37 ▲0.0244.78 ▼1.95
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.08 ▼9.49
Media Library /wp-admin/upload.php3.25 ▲0.0234.52 ▼0.21

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

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

Browser metrics Passed 4 tests

Admin Private Note on users: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.63 ▼0.741.72 ▼0.4946.37 ▲2.70
Dashboard /wp-admin2,210 ▲225.82 ▲0.7899.61 ▼14.0636.91 ▼9.45
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0436.49 ▼1.8833.93 ▼1.60
Add New Post /wp-admin/post-new.php1,671 ▲15722.27 ▲4.83616.32 ▼74.9762.29 ▲6.63
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.03103.55 ▼2.1743.88 ▼2.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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 no errors were found, this is by no means 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-private-note-on-users/admin_private_note.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: users, invisible, hidden, users list, admin...

admin-private-note-on-users/admin_private_note.php 85% from 13 tests

The main PHP script in "Admin Private Note on users" version 1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("admin-private-note-on-users.php" instead of "admin_private_note.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin73 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1161167
JavaScript20106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.62KB12.73KB▼ 67.03%