PHPackages                             karmabunny/nstrack - 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. karmabunny/nstrack

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

karmabunny/nstrack
==================

Track namespace use in PHP

v1.1.0(3mo ago)3406↓37.5%1[1 issues](https://github.com/Karmabunny/nstrack/issues)1GPL-3.0-or-laterPHPCI passing

Since Oct 21Pushed 3mo ago9 watchersCompare

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

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

NStrack: for tracking namespace use in PHP
==========================================

[](#nstrack-for-tracking-namespace-use-in-php)

PHP 5.3 introduced namespaces, which are great for managing large codebases and integrating disparate projects. However, they also introduce significant complexity.

NStrack allows you to search an entire codebase, find all class/interface references, and make sure they're referencing classes that actually exist with appropriate use statements.

It's particularly useful if you have legacy code which you want to move into namespaces, and it's also useful for managing new code to minimise runtime errors.

Usage
-----

[](#usage)

Call `nstrack.php` from within your source code directory.

e.g.

```
php ~/git/nstrack/nstrack.php
```

There are also some flags which do additional processing:

- `--write`Write mode. Alter files rather than just listing changes. A little bit buggy sometimes. Don't use this if you're not using source control!
- `--verbose`Output extra information
- `--debug`Output debugging information
- `--targeted`Refines the output and side-effects (e.g. `--write`) to a certain directory or file.
- `--needs`Display only missing use statements.
- `--missing`Display only missing classes.
- `--colours`Enable coloured output.
- `--git`Only operate on changed paths (according to `git status`). Useful with `-w` when making changes to projects, especially namespace renames.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance75

Regular maintenance activity

Popularity21

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.5% 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 ~1575 days

Total

2

Last Release

96d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11b33084210490439a6fb2c0b277e0bf39f8d0e368f20bebb703834003a617df?d=identicon)[karmabunny](/maintainers/karmabunny)

---

Top Contributors

[![carbsrule](https://avatars.githubusercontent.com/u/10014710?v=4)](https://github.com/carbsrule "carbsrule (50 commits)")[![TheJosh](https://avatars.githubusercontent.com/u/1219314?v=4)](https://github.com/TheJosh "TheJosh (25 commits)")[![gwillz](https://avatars.githubusercontent.com/u/3466850?v=4)](https://github.com/gwillz "gwillz (8 commits)")[![andrew-kb](https://avatars.githubusercontent.com/u/15764995?v=4)](https://github.com/andrew-kb "andrew-kb (4 commits)")

---

Tags

namespace

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/karmabunny-nstrack/health.svg)

```
[![Health](https://phpackages.com/badges/karmabunny-nstrack/health.svg)](https://phpackages.com/packages/karmabunny-nstrack)
```

###  Alternatives

[suncat/mobile-detect-bundle

Symfony2/3/4 bundle for detect mobile devices, managing mobile view types, redirect to mobile version.

4035.3M7](/packages/suncat-mobile-detect-bundle)[typisttech/imposter-plugin

Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

158251.0k2](/packages/typisttech-imposter-plugin)[typisttech/imposter

Wrapping all composer vendor packages inside your own namespace. Intended for WordPress plugins.

111286.6k1](/packages/typisttech-imposter)[shipmonk/name-collision-detector

Simple tool to find ambiguous classes or any other name duplicates within your project.

362.1M35](/packages/shipmonk-name-collision-detector)[nilportugues/php_backslasher

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

889.3k18](/packages/nilportugues-php-backslasher)[frozzare/wp-autoload

Simple autoloader that will autoload classes or traits with namespace prefix

1618.3k4](/packages/frozzare-wp-autoload)

PHPackages © 2026

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