84% custom-admin-notice

Code Review | Custom Admin Notice

WordPress plugin Custom Admin Notice scored84%from 54 tests.

About plugin

  • Plugin page: custom-admin-notice
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: May 10, 2022
  • Latest release: Sep 19, 2023
  • Number of updates: 9
  • Update frequency: every 220.2 days
  • Top authors: tex0gen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /369 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Custom Admin Notice
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.72 ▼6.83
Dashboard /wp-admin3.32 ▲0.0246.41 ▲0.08
Posts /wp-admin/edit.php3.37 ▲0.0248.29 ▼3.06
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.79 ▼2.47
Media Library /wp-admin/upload.php3.25 ▲0.0233.01 ▼0.01
Admin Notice /wp-admin/options-general.php?page=custom-admin-notice3.1935.13

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
custom_admin_notice
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Admin Notice
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.25 ▼1.541.84 ▲0.3238.96 ▼6.54
Dashboard /wp-admin2,218 ▲335.03 ▼0.83108.59 ▲0.9340.15 ▼2.01
Posts /wp-admin/edit.php2,098 ▲92.02 ▲0.0438.91 ▼3.0735.96 ▲0.82
Add New Post /wp-admin/post-new.php1,540 ▲2123.31 ▼0.07628.65 ▼63.2663.31 ▼12.45
Media Library /wp-admin/upload.php1,397 ▲124.33 ▲0.1093.56 ▼16.9340.98 ▼6.79
Admin Notice /wp-admin/options-general.php?page=custom-admin-notice1,2715.36100.2650.88

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • custom_admin_notice
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=custom-admin-notice
    • > Notice in wp-content/plugins/custom-admin-notice/custom-admin-notice.php+92
    Undefined index: enabled
    • > GET request to /wp-admin/options-general.php?page=custom-admin-notice
    • > Notice in wp-content/plugins/custom-admin-notice/custom-admin-notice.php+97
    Undefined index: dismissable
    • > GET request to /wp-admin/options-general.php?page=custom-admin-notice
    • > Notice in wp-content/plugins/custom-admin-notice/custom-admin-notice.php+143
    Undefined index: message

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
5 plugin tags: admin, custom, notices, dashboard, notice

custom-admin-notice/custom-admin-notice.php Passed 13 tests

The principal PHP file in "Custom Admin Notice" v. 1.1.0 is loaded by WordPress automatically on each request
57 characters long description:
Display custom admin notices on your WordPress dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin167 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13218155
JavaScript10012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity8.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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin