PHPackages                             asvinb/wp-nonce-oo - 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. [Security](/categories/security)
4. /
5. asvinb/wp-nonce-oo

ActiveLibrary[Security](/categories/security)

asvinb/wp-nonce-oo
==================

081PHP

Since Jan 25Pushed 10y ago1 watchersCompare

[ Source](https://github.com/asvinb/wp-nonce-oo)[ Packagist](https://packagist.org/packages/asvinb/wp-nonce-oo)[ RSS](/packages/asvinb-wp-nonce-oo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Implementation of WordPress Nonces in an object oriented way
============================================================

[](#implementation-of-wordpress-nonces-in-an-object-oriented-way)

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

[](#installation)

```
	composer require asvinb/wp-nonce-oo
```

How to use
----------

[](#how-to-use)

Create nonce

```
	$nonce = \Nonce\Wrapper::wp_create_nonce();
```

Verify nonce

```
	$isValid = \Nonce\Wrapper::wp_verify_nonce($nonce);
```

Create nonce hidden input

```
	\Nonce\Wrapper::wp_nonce_field();
```

Generate nonce URL:

```
	$url = \Nonce\Wrapper::wp_nonce_url('http://www.google.com');
```

Check if request was been referred from an admin screen:

```
	$admin = \Nonce\Wrapper::check_admin_referer();
```

Verifies the AJAX request to prevent processing requests external of the blog.

```
	$ajax = \Nonce\Wrapper::check_ajax_referer();
```

Testing
-------

[](#testing)

```
vendor/bin/phpunit
```

Do update the WP\_INSTALL constant in phpunit.xml to a local working WordPress installation

Changelog
---------

[](#changelog)

### 0.1

[](#01)

Initial version

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7465e5790324dd824ce4bd5d95e73d23980612157cc16aece0d0fd503aeb2ae3?d=identicon)[asvinb](/maintainers/asvinb)

---

Top Contributors

[![asvinb](https://avatars.githubusercontent.com/u/31818?v=4)](https://github.com/asvinb "asvinb (3 commits)")

### Embed Badge

![Health badge](/badges/asvinb-wp-nonce-oo/health.svg)

```
[![Health](https://phpackages.com/badges/asvinb-wp-nonce-oo/health.svg)](https://phpackages.com/packages/asvinb-wp-nonce-oo)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M212](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M112](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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