73% admin-note

Code Review | Admin Notes

WordPress plugin Admin Notes scored73%from 54 tests.

About plugin

  • Plugin page: admin-note
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • 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

20+ active /2,109 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Admin Notes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.86 ▼3.17
Dashboard /wp-admin3.35 ▲0.0443.53 ▼9.72
Posts /wp-admin/edit.php3.40 ▲0.0458.15 ▲10.49
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.56 ▲6.16
Media Library /wp-admin/upload.php3.27 ▲0.0435.04 ▼1.91

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: 1 new table, 7 new options
New tables
wp_adminnote
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
admin_note_version
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Notes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.37 ▼0.011.93 ▼0.0044.77 ▲1.12
Dashboard /wp-admin2,216 ▲425.69 ▲0.1083.55 ▼19.6674.78 ▲31.32
Posts /wp-admin/edit.php2,124 ▲211.99 ▼0.0537.69 ▲1.7633.84 ▼1.14
Add New Post /wp-admin/post-new.php1,554 ▲2323.16 ▼0.16710.68 ▲26.2362.67 ▲12.23
Media Library /wp-admin/upload.php1,421 ▲244.16 ▼0.05102.16 ▼2.1945.82 ▲0.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_adminnote
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • admin_note_version

Smoke tests 75% 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)
Good news, no errors were detected

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please a description for screenshot #2 in admin-note/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === admin-note === )
Please take inspiration from this readme.txt

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

The main file in "Admin Notes" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admin-note.php" instead of "adminnote.php")

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
Good job! No executable or dangerous file extensions detected427 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23816362
CSS11064
JavaScript1011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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%