89% admin-notice

Code Review | Admin Notice

WordPress plugin Admin Notice scored89%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: 6.3.1
  • 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

8 reviews

Install metrics

800+ active /4,906 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.64ms] Passed 4 tests

An overview of server-side resources used by Admin Notice
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.79 ▲1.70
Dashboard /wp-admin3.35 ▲0.0048.93 ▼10.95
Posts /wp-admin/edit.php3.40 ▲0.0446.83 ▲1.73
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.74 ▼7.79
Media Library /wp-admin/upload.php3.28 ▲0.0431.95 ▼1.53
Admin Notice /wp-admin/options-general.php?page=admin_notice3.2831.22

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Admin Notice
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲2514.35 ▼0.011.76 ▲0.1443.59 ▲4.51
Dashboard /wp-admin2,205 ▲285.63 ▲0.0292.27 ▲2.4542.17 ▲6.84
Posts /wp-admin/edit.php2,107 ▲42.02 ▼0.0133.72 ▼1.6934.23 ▼1.86
Add New Post /wp-admin/post-new.php1,536 ▲823.31 ▲0.31663.35 ▼28.1153.65 ▼0.93
Media Library /wp-admin/upload.php1,407 ▲74.22 ▲0.04101.40 ▲0.9147.98 ▼0.46
Admin Notice /wp-admin/options-general.php?page=admin_notice1,2805.2398.4650.00

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === admin-notice === )
The official readme.txt might help

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

The entry point to "Admin Notice" version 1.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: Required version does not match 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin197 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP248117197

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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.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%