PHPackages                             ernilambar/wp-admin-notice - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. ernilambar/wp-admin-notice

ActiveLibrary[Admin Panels](/categories/admin)

ernilambar/wp-admin-notice
==========================

WordPress Helper for showing admin notice

2.0.2(yesterday)11.5kMITPHPPHP &gt;=7.2.24CI passing

Since Jun 27Pushed yesterday1 watchersCompare

[ Source](https://github.com/ernilambar/wp-admin-notice)[ Packagist](https://packagist.org/packages/ernilambar/wp-admin-notice)[ Docs](https://github.com/ernilambar/wp-admin-notice)[ RSS](/packages/ernilambar-wp-admin-notice/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (9)Versions (7)Used By (0)

WP Admin Notice
===============

[](#wp-admin-notice)

[![Type: Library](https://camo.githubusercontent.com/3185153a66223d0c8f35358587cbf5f52aeed4d5ab4793a8e8d091e95d8a8cac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f547970652d4c6962726172792d627269676874677265656e2e737667)](https://camo.githubusercontent.com/3185153a66223d0c8f35358587cbf5f52aeed4d5ab4793a8e8d091e95d8a8cac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f547970652d4c6962726172792d627269676874677265656e2e737667)[![CMS: WordPress](https://camo.githubusercontent.com/77589a6fd9e5155acf3b2460a6b78d5fc6594b967dd2a48d51ea60a71006def8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f434d532d576f726450726573732d626c75652e737667)](https://camo.githubusercontent.com/77589a6fd9e5155acf3b2460a6b78d5fc6594b967dd2a48d51ea60a71006def8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f434d532d576f726450726573732d626c75652e737667)[![PHP: Requires PHP 7.2](https://camo.githubusercontent.com/65903264a806472caee7a87c86083223e4c387194d6940d36912003fdf4b64d2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d5265717569726573253230504850253230372e322d3838393242462e737667)](https://camo.githubusercontent.com/65903264a806472caee7a87c86083223e4c387194d6940d36912003fdf4b64d2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d5265717569726573253230504850253230372e322d3838393242462e737667)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)

WordPress helper for showing a dismissible "please review" admin notice after a plugin or theme has been in use for a number of days.

Installation
------------

[](#installation)

```
composer require ernilambar/wp-admin-notice
```

Requirements
------------

[](#requirements)

- WP 6.0+
- PHP 7.2+

Usage
-----

[](#usage)

Call `Notice::init()` on `admin_init`. `slug` must match the WordPress.org plugin or theme slug, since it builds the review URL.

```
use Nilambar\AdminNotice\Notice;

add_action( 'admin_init', function () {
	Notice::init(
		[
			'slug' => 'my-plugin',
			'name' => 'My Plugin',
		]
	);
} );
```

Advanced usage
--------------

[](#advanced-usage)

The defaults are plain English. To translate them, copy this block and swap `my-plugin` for your text domain:

```
use Nilambar\AdminNotice\Notice;

add_action( 'admin_init', function () {
	Notice::init(
		[
			'slug'          => 'my-plugin',
			'name'          => 'My Plugin',
			'type'          => 'plugin',
			'days'          => 7,
			'capability'    => 'manage_options',
			'screens'       => [],
			'classes'       => [],
			'message'       => sprintf(
				/* translators: 1: Name, 2: Days. */
				esc_html__( 'Hello! Seems like you have been using %1$s for more than %2$d days - that\'s awesome! Could you please do us a BIG favor and give it a 5-star rating on WordPress? This would boost our motivation and help us spread the word.', 'my-plugin' ),
				'My Plugin',
				7
			),
			'action_labels' => [
				'review'  => esc_html__( 'Ok, you deserve it', 'my-plugin' ),
				'later'   => esc_html__( 'Nope, maybe later', 'my-plugin' ),
				'dismiss' => esc_html__( 'I already did', 'my-plugin' ),
			],
		]
	);
} );
```

Strings placed in your plugin or theme this way are picked up by `wp i18n make-pot` and translated through your normal workflow.

Arguments
---------

[](#arguments)

KeyTypeDefaultDescription`slug`string—**Required.** WordPress.org slug. Also prefixes option keys and hook names. Missing or empty returns `null`.`name`stringTitle-cased `slug`Name used in the default message.`type`string`plugin``plugin` or `theme`; anything else falls back to `plugin`.`days`int`7`Days before showing, and the delay added by "maybe later".`capability`string`manage_options`Capability needed to see and dismiss.`screens`array`[]`Screen IDs to limit to. Empty shows everywhere.`classes`array`[]`Extra CSS classes. `notice notice-info` is always applied.`action_labels`array`review`, `later`, `dismiss`Link labels. Empty string hides that link.`message`stringBuilt-in textNotice body. **Echoed unescaped** — escape it yourself. Empty hides the notice.License
-------

[](#license)

This project is licensed under the [MIT](https://opensource.org/license/MIT).

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance100

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~302 days

Recently: every ~295 days

Total

6

Last Release

1d ago

Major Versions

1.0.2 → 2.0.02024-07-26

PHP version history (2 changes)1.0.0PHP &gt;=5.6

2.0.0PHP &gt;=7.2.24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2098823?v=4)[Nilambar Sharma](/maintainers/ernilambar)[@ernilambar](https://github.com/ernilambar)

---

Top Contributors

[![ernilambar](https://avatars.githubusercontent.com/u/2098823?v=4)](https://github.com/ernilambar "ernilambar (42 commits)")

---

Tags

wordpressadminnotice

### Embed Badge

![Health badge](/badges/ernilambar-wp-admin-notice/health.svg)

```
[![Health](https://phpackages.com/badges/ernilambar-wp-admin-notice/health.svg)](https://phpackages.com/packages/ernilambar-wp-admin-notice)
```

###  Alternatives

[wecodemore/current-admin-info

Displays info about the current admin screen and its globals, contextual hooks, etc.

842.7k](/packages/wecodemore-current-admin-info)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
