PHPackages                             josevega/wp-points-arenas - 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. josevega/wp-points-arenas

ActiveLibrary

josevega/wp-points-arenas
=========================

06PHP

Since Nov 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/JoseVega/wp-points-arenas)[ Packagist](https://packagist.org/packages/josevega/wp-points-arenas)[ RSS](/packages/josevega-wp-points-arenas/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Points and Arenas Class for WordPress Users
===========================================

[](#points-and-arenas-class-for-wordpress-users)

You can use this class to give points to users, remove points, move to different arenas or levels, and provide points for completing different milestones (courses, right answers, etc.)

This includes a options page that appears in "wp-admin &gt; options &gt; points and arenas". The options page requires the "ultimate fields" plugin.

You can use the object through the function VG\_Points\_Obj() , you need to call the create\_table method once per site, for example, if you include this class in your plugins or themes, you can call it on plugin/theme activation. If you want to support multisite installs you can call this method when a new site is created.

It uses the singleton pattern.

Internal settings
=================

[](#internal-settings)

The settings are simple, you can change the properties in the object:

```
var $table_name = 'points'; // Change the table and global fields name

	var $enable_arenas = true; // Enable the arenas logic

	var $enable_rankings = true; // Enable the rankings logic

	var $enable_limits = true; // Enable yearly limits

	var $starting_points = 1; // Points given to users on registration

```

You shouldn't modify the code in the class, instead you should overwrite those properties on runtime. Example:

```
VG_Points_Obj()->table_name = 'user_credit';

```

Usage
=====

[](#usage)

This class is very easy to use. You just need to call the methods when the right action occurs. For example:

```
VG_Points_Obj()->add_victory($user_id);

VG_Points_Obj()->add_loss($user_id);

```

If you want to give points regardless of the event

```
VG_Points_Obj()->add_points_to_user($user_id, $points = 1, $type = 'in', $source = 'general');

```

If you want to remove points regardless of the event

```
VG_Points_Obj()->add_points_to_user($user_id, $points = 1, $type = 'out', $source = 'loss');

```

The user will automatically move to the next level/arena if he reaches the current arena limits set in the settings page in wp-admin.

Need help?
==========

[](#need-help)

Do you need help using/integrating this class? You can find my email in my github profile and get in touch.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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/87bbef6bbc0cfd087466120b4998810029cf59e42c2ba7e0aa9f109a23615e4b?d=identicon)[JoseVega](/maintainers/JoseVega)

---

Top Contributors

[![JoseVega](https://avatars.githubusercontent.com/u/3590644?v=4)](https://github.com/JoseVega "JoseVega (8 commits)")

### Embed Badge

![Health badge](/badges/josevega-wp-points-arenas/health.svg)

```
[![Health](https://phpackages.com/badges/josevega-wp-points-arenas/health.svg)](https://phpackages.com/packages/josevega-wp-points-arenas)
```

PHPackages © 2026

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