PHPackages                             dcabrejas/magento-rate-limit - 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. dcabrejas/magento-rate-limit

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

dcabrejas/magento-rate-limit
============================

Rate Limiting Library With Token Bucket Algorithm with Magento Adapter

1.0.0(9y ago)07.9kMITPHPPHP &gt;=5.5

Since Jul 4Pushed 9y agoCompare

[ Source](https://github.com/dcabrejas/magento-rate-limit)[ Packagist](https://packagist.org/packages/dcabrejas/magento-rate-limit)[ RSS](/packages/dcabrejas-magento-rate-limit/feed)WikiDiscussions master Synced 2d ago

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

magento-rate-limit
==================

[](#magento-rate-limit)

Magento 2 adapter for the [touhonoob/RateLimit](https://github.com/touhonoob/RateLimit) Library

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

[](#installation)

```
composer require dcabrejas/magento-rate-limit
```

Usage
-----

[](#usage)

```
//Inject the adapter via dependency injection
public function __construct(\Dcabrejas\RateLimit\Adapter\Magento $magentoAdapter)
{
  $this->magentoAdapter = $magentoAdapter;
}

$rateLimit = new \Touhonoob\RateLimit\RateLimit("myratelimit", 100, 3600, $this->magentoAdapter); // 100 Requests / Hour

$id = $_SERVER['REMOTE_ADDR']; // Use client IP as identity
if ($rateLimit->check($id) > 0) {
  echo "passed";
} else {
  echo "rate limit exceeded";
}
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

3287d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8201815?v=4)[Diego Cabrejas](/maintainers/dcabrejas)[@dcabrejas](https://github.com/dcabrejas)

### Embed Badge

![Health badge](/badges/dcabrejas-magento-rate-limit/health.svg)

```
[![Health](https://phpackages.com/badges/dcabrejas-magento-rate-limit/health.svg)](https://phpackages.com/packages/dcabrejas-magento-rate-limit)
```

###  Alternatives

[spatie/macroable

A trait to dynamically add methods to a class

72964.4M76](/packages/spatie-macroable)[google/longrunning

Google LongRunning Client for PHP

5784.4M6](/packages/google-longrunning)[sphpdox/sphpdox

PHPDoc to Sphinx phpdomain tool

4817.9k9](/packages/sphpdox-sphpdox)[melvinachterhuis/zero-margin-blocks-shopware6-plugin

Replaces default 20px margin with 0

1515.5k](/packages/melvinachterhuis-zero-margin-blocks-shopware6-plugin)

PHPackages © 2026

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