73% admin-note

Code Review | Admin Notes

WordPress plugin Admin Notes scored 73% from 54 tests.

About plugin

  • Plugin page: admin-note
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jan 22, 2014
  • Latest release: Jan 23, 2014
  • Number of updates: 14
  • Update frequency: every 0.1 days
  • Top authors: minhlaobao (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active / 1,899 total downloads

Benchmarks

Plugin footprint 65% 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.02MB] [CPU: ▼291.24ms] Passed 4 tests

This is a short check of server-side resources used by Admin Notes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0562.23 ▲9.47
Dashboard /wp-admin3.45 ▲0.0437.31 ▼4.00
Posts /wp-admin/edit.php3.68 ▲0.0451.14 ▲8.96
Add New Post /wp-admin/post-new.php6.92 ▼0.0597.55 ▼1,170.61
Media Library /wp-admin/upload.php3.33 ▲0.0429.31 ▲0.69

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: 1 new table, 1 new option
New tables
wp_adminnote
New WordPress options
admin_note_version

Browser metrics Passed 4 tests

A check of browser resources used by Admin Notes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,789 ▲6716.22 ▲0.415.79 ▼0.382.28 ▼0.11
Dashboard /wp-admin2,924 ▲666.26 ▲0.08120.36 ▼14.52178.12 ▲16.65
Posts /wp-admin/edit.php2,714 ▲233.24 ▲0.0064.87 ▲0.10140.55 ▼11.43
Add New Post /wp-admin/post-new.php1,710 ▼5020.90 ▼1.20433.56 ▲13.73160.65 ▲2.40
Media Library /wp-admin/upload.php1,717 ▲195.66 ▲0.17125.28 ▼15.00198.26 ▲2.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_adminnote
  • Zombie WordPress options detected upon uninstall: 1 option
    • admin_note_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/admin-note/adminnote.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === admin-note === )
  • Screenshots: Please describe screenshot #2 in admin-note/assets to your readme.txt
You can take inspiration from this readme.txt

admin-note/adminnote.php 92% from 13 tests

The entry point to "Admin Notes" version 1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("admin-note.php" instead of "adminnote.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin427 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23816362
CSS11064
JavaScript1011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
notes.png3.58KB0.95KB▼ 73.41%