PHPackages                             jlaso/simple-stats - 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. jlaso/simple-stats

ActiveLibrary

jlaso/simple-stats
==================

A simple system to log events in your PHP app

3251PHP

Since Jul 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jlaso/simple-stats)[ Packagist](https://packagist.org/packages/jlaso/simple-stats)[ RSS](/packages/jlaso-simple-stats/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

simple-stats
============

[](#simple-stats)

A simple system to log events in your PHP app

Installation
============

[](#installation)

You need only to require this package in your project `composer require jlaso/simple-stats`

Configuration (optional)
========================

[](#configuration-optional)

In order to let know the library where it can put it's database file and other things related with setup you can copy the distribution file config-stats-base.yml.dist in the root of your project with the config-stats-base.yml

This file contains:

```
database:
    driver: pdo_sqlite
    path: "%project_dir%/app/cache/simple_stats.sqlite"
    charset: UTF8

models:
    - clicks
    - ips
    - logins

```

The database key configures how the sqlite will work, and the models key informs SimpleStats about the events we want to register. Any change on any of these keys requires remove the sqlite database file in order that SimpleStats recreates new one.

For the moment no migration process is allowed.

Info
----

[](#info)

That library uses svg files in order to show the results of the statistics.

Commands
========

[](#commands)

In order to check the examples I provided a couple of commands that you can start from terminal

### Create demo data

[](#create-demo-data)

Create thousand of records in every event table with invented data.

`src/console database:create-and-seed`

### Create a graph svg file with the data

[](#create-a-graph-svg-file-with-the-data)

```
src/console graph:create --graph=scatter --event="clicks,ips,logins" --title="Events by day"
open temp.svg.html

```

As you can see you can just pass one event table or several separated by commas. The output default file is temp.svg.html.

Graphs provided
---------------

[](#graphs-provided)

As I told you the system uses a third party SVG library in order to represent statistical data.

For the moment there are this graph available:

Bar
---

[](#bar)

Use: Data ordered in a bar or piles way

[![](doc/images/example-bars.png)](doc/images/example-bars.png)

Scatter
-------

[](#scatter)

Use: Data with X reference (2d) with one or several dimensions

[![](doc/images/example-scatter.png)](doc/images/example-scatter.png)

Running the examples
====================

[](#running-the-examples)

Go to terminal and start PHP listening in the root folder of the project `php -S localhost:8000`

Now you can go with your favourite browser to

For the moment there are two examples. You have to see the same data in both, but using different technology. Just to show you how easy is to use this library.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

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/6f19216fd9d91bd7cfff14362e2ddb5728bd2d8f50d2e0174626fc61510ed33b?d=identicon)[jlaso](/maintainers/jlaso)

---

Top Contributors

[![jlaso](https://avatars.githubusercontent.com/u/1332197?v=4)](https://github.com/jlaso "jlaso (5 commits)")

### Embed Badge

![Health badge](/badges/jlaso-simple-stats/health.svg)

```
[![Health](https://phpackages.com/badges/jlaso-simple-stats/health.svg)](https://phpackages.com/packages/jlaso-simple-stats)
```

PHPackages © 2026

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