PHPackages                             christophwolff/wpnonce - 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. christophwolff/wpnonce

ActiveComposer-wordpress-package[Security](/categories/security)

christophwolff/wpnonce
======================

A simple OOP Class for using nonces in WordPress

0.0.1(10y ago)029MIT

Since Jun 2Compare

[ Source](https://github.com/christophwolff/WPnonce)[ Packagist](https://packagist.org/packages/christophwolff/wpnonce)[ RSS](/packages/christophwolff-wpnonce/feed)WikiDiscussions Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

WPnonce
=======

[](#wpnonce)

Some class to use WP nonces in a OOP kind of way

\##Install

```
composer require christophwolff/wpnonce

```

Or just add

```
"christophwolff/wpnonce": "0.0.1"

```

to your `compsoer.json` file and run a compposer update

\##Usage:

\###Create a nonce with a specific action

```
$myNonce = new WPnonce( 'myAction' );
$freshNonce = $myNonce->createNonce();
```

\###Verify a nonce with a specific action

```
$myNonce = new WPnonce( 'myAction' );

$result = $myNonce->verifyNonce( '34653456f' );
```

\###Create a noncefield with a specific action

```
$myNonce = new WPnonce( 'myAction' );

$htmlField = $myNonce->createNonceField( '_wpnonce', true );
```

\###Create an URL with a nonce parameter

```
$name = '_wpnonce';
$actionUrl = 'http://my.wrdprss.com/foo/bar';

$myNonce = new WPnonce( 'myAction' );

$actionUrlNonce = $myNonce->createNonceUrl( $actionUrl, $name, true );
```

\###Check an URL for a vaild nonce

```
$myNonce = new WPnonce( 'myAction' );

$result = $myNonce->checkAdminReferer( $query_arg );
```

\###Check an AJAX URL for a vaild nonce

```
$query_arg = '_wpnonce_name';
$myNonce = new WPnonce( 'myAction' );

$result = myNonce->checkAjaxReferer( $query_arg, true );
```

\##Changelog

### 0.0.1

[](#001)

- Init

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

3680d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2046613?v=4)[Christoph Wolff](/maintainers/christophwolff)[@christophwolff](https://github.com/christophwolff)

---

Top Contributors

[![christophwolff](https://avatars.githubusercontent.com/u/2046613?v=4)](https://github.com/christophwolff "christophwolff (1 commits)")

### Embed Badge

![Health badge](/badges/christophwolff-wpnonce/health.svg)

```
[![Health](https://phpackages.com/badges/christophwolff-wpnonce/health.svg)](https://phpackages.com/packages/christophwolff-wpnonce)
```

###  Alternatives

[mews/purifier

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

2.0k18.0M138](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24772.0k36](/packages/paragonie-ecc)

PHPackages © 2026

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