PHPackages                             ovidiul/wp-nonces-oop - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ovidiul/wp-nonces-oop

ActiveProject[Utility &amp; Helpers](/categories/utility)

ovidiul/wp-nonces-oop
=====================

Classes that implements the WordPress Nonces functionality in an object oriented way.

v1.0(8y ago)0411MITPHPPHP &gt;=5.6CI failing

Since Jan 4Pushed 5y agoCompare

[ Source](https://github.com/ovidiul/wp-nonces-oop)[ Packagist](https://packagist.org/packages/ovidiul/wp-nonces-oop)[ Docs](https://github.com/ovidiul/wp-nonces-oop)[ RSS](/packages/ovidiul-wp-nonces-oop/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

wp-nonces-oop
=============

[](#wp-nonces-oop)

Package that implements the WordPress Nonces functionality (wp\_nonce\_\*()) in an object orientated way.

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

[](#requirements)

- PHP 5.6+
- Composer
- WordPress 4.8.3+

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

[](#installation)

Install with [Composer](https://getcomposer.org):

```
$ composer require ovidiul/wp-nonces-oop:dev-master
```

### Run the tests

[](#run-the-tests)

To run tests, executes commands below:

```
$ cd vendor/thinkovi/wp-nonces-oop
$ composer install
$ vendor/bin/phpunit
```

Features
--------

[](#features)

- PSR-4 autoloading compliant structure
- Unit-Testing with PHPUnit
- Comprehensive Guides and tutorial
- Easy to use to any Framework or even a plain php file

Usage
-----

[](#usage)

Initialize the nonce object generator

**`$generator = new NonceGenerator( 'action_name', 'nonce_parameter_name' );`**

Then, to generate the nonce use the generate\_nonce() method:

**`$nonce = $generator->generate_nonce();`**

Generate a url with nonce parameter:

**`$url = $generator->generate_nonce_url( 'http://www.thinkovi.com' );`**

Generate nonce field:

**`$field = $generator->generate_nonce_field();`**

Nonce validation:

**`$is_valid = $generator->validate_nonce($nonce);`**

To validate a nonce received in a page through request (GET or POST) use the validate\_request() method:

**`$is_valid = $generator->validate_request();`**

Credits
-------

[](#credits)

Liuta Ovidiu  ,

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

3050d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/29b4c2d0b87e36234b0db13b82e6f111a86ace4a8a2e24d2b954b155021ba13c?d=identicon)[ovidiul](/maintainers/ovidiul)

---

Top Contributors

[![ovidiul](https://avatars.githubusercontent.com/u/537751?v=4)](https://github.com/ovidiul "ovidiul (34 commits)")

---

Tags

wordpressOOPNonces

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ovidiul-wp-nonces-oop/health.svg)

```
[![Health](https://phpackages.com/badges/ovidiul-wp-nonces-oop/health.svg)](https://phpackages.com/packages/ovidiul-wp-nonces-oop)
```

###  Alternatives

[aristath/kirki

Extending the WordPress customizer

1.3k73.0k4](/packages/aristath-kirki)[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.6k](/packages/afragen-git-updater)

PHPackages © 2026

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