99% admin-notice

Code Review | Admin Notice

WordPress plugin Admin Notice scored 99% from 54 tests.

About plugin

  • Plugin page: admin-notice
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.1-5.9
  • WordPress version: 5.9.2
  • First release: Apr 6, 2015
  • Latest release: Jan 25, 2022
  • Number of updates: 15
  • Update frequency: every 165.9 days
  • Top authors: adamwalter (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active / 3,141 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼295.47ms] Passed 4 tests

An overview of server-side resources used by Admin Notice
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0255.19 ▲3.28
Dashboard /wp-admin3.44 ▲0.0333.78 ▼3.01
Posts /wp-admin/edit.php3.66 ▲0.0238.01 ▼0.78
Add New Post /wp-admin/post-new.php6.91 ▼0.06100.14 ▼1,173.00
Media Library /wp-admin/upload.php3.31 ▲0.0126.36 ▼5.08
Admin Notice /wp-admin/options-general.php?page=admin_notice3.3224.43

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Admin Notice: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲1715.93 ▲0.006.33 ▲0.052.46 ▲0.38
Dashboard /wp-admin2,900 ▲426.14 ▼0.04113.68 ▼14.63153.02 ▼6.37
Posts /wp-admin/edit.php2,696 ▲83.24 ▲0.0163.12 ▼2.25146.60 ▲7.10
Add New Post /wp-admin/post-new.php1,667 ▼8515.99 ▼5.57419.20 ▼15.24157.60 ▲4.76
Media Library /wp-admin/upload.php1,706 ▲85.52 ▼0.03143.71 ▲5.24186.71 ▼2.82
Admin Notice /wp-admin/options-general.php?page=admin_notice1,5636.41125.33177.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === admin-notice === )
The official readme.txt might help

admin-notice/admin-notice.php 92% from 13 tests

The primary PHP file in "Admin Notice" version 1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "5.4.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected197 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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.11MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png109.06KB63.28KB▼ 41.97%