PHPackages                             novseje/yii2-recaptcha-widget - 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. novseje/yii2-recaptcha-widget

ActiveYii2-extension[Security](/categories/security)

novseje/yii2-recaptcha-widget
=============================

Spam check widget for Yii2, based on Google reCAPTCHA API v3

1.0.1(7mo ago)09MITPHPPHP &gt;=5.6

Since Jan 21Pushed 7mo agoCompare

[ Source](https://github.com/novseje/yii2-recaptcha-widget)[ Packagist](https://packagist.org/packages/novseje/yii2-recaptcha-widget)[ RSS](/packages/novseje-yii2-recaptcha-widget/feed)WikiDiscussions master Synced today

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

Google reCAPTCHA v3 widget for Yii2
===================================

[](#google-recaptcha-v3-widget-for-yii2)

Spam check widget for Yii2, based on Google reCAPTCHA API v3.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist novseje/yii2-recaptcha-widget "*"

```

or add

```
"novseje/yii2-recaptcha-widget": "*"

```

to the require section of your `composer.json` file.

Further:

- [Sign up for an reCAPTCHA API keys.](https://www.google.com/recaptcha/admin/create)
- Configure the component in your configuration file (`frontend/config/main.php`):

```
'components' => [
    ...
    'reCaptcha' => [
        'class' => 'xstreamka\recaptcha\ReCaptchaConfig',
        'siteKeyV3' => 'your siteKey v3',
        'secretV3' => 'your secret key v3',
        'minScore' => 0.3, // optional
    ],
    ...
]
```

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by:

```

...

...

```

this will add a hidden field to your form.

Validate
--------

[](#validate)

For form validation use:

```

```

this is called after POST request.

Example
-------

[](#example)

```
$model = new QuestionForm();
if ($model->load(Yii::$app->request->post()) && $model->validate() && \xstreamka\recaptcha\ReCaptcha::validate()) {
...
}
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance62

Regular maintenance activity

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.4% 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 ~292 days

Total

2

Last Release

235d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17447539?v=4)[novseje](/maintainers/novseje)[@novseje](https://github.com/novseje)

---

Top Contributors

[![novseje](https://avatars.githubusercontent.com/u/17447539?v=4)](https://github.com/novseje "novseje (5 commits)")[![xstreamka](https://avatars.githubusercontent.com/u/73387820?v=4)](https://github.com/xstreamka "xstreamka (2 commits)")

---

Tags

googlerecaptchacaptchayii2extensionwidget

### Embed Badge

![Health badge](/badges/novseje-yii2-recaptcha-widget/health.svg)

```
[![Health](https://phpackages.com/badges/novseje-yii2-recaptcha-widget/health.svg)](https://phpackages.com/packages/novseje-yii2-recaptcha-widget)
```

PHPackages © 2026

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