PHPackages                             webdevstudios/plugin-path-finder - 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. webdevstudios/plugin-path-finder

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

webdevstudios/plugin-path-finder
================================

A WordPress library to extend WordPress's plugin\_dir\_path and plugin\_dir\_url methods.

26PHP

Since Jun 29Pushed 7y ago38 watchersCompare

[ Source](https://github.com/WebDevStudios/Plugin-Path-Finder)[ Packagist](https://packagist.org/packages/webdevstudios/plugin-path-finder)[ RSS](/packages/webdevstudios-plugin-path-finder/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Plugin Path Finder
==================

[](#plugin-path-finder)

A small WordPress utility to enhance the capabilities of `plugin_dir_path`and `plugin_dir_url`.

The methods in this library will allow you to find the root path of your plugin or the URL to any asset in that plugin without needing to set up complex file or dependency injection structures.

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

[](#installation)

This package can be installed a couple of different ways. It was originally developed as a small mu-plugin, so you could clone down this directory and then add the `plugin-path-finder.php` file to your mu-plugins directory.

Alternately, you can install it via Composer: `composer require webdevstudios/plugin-path-finder`. It's registered as a regular library, so you'll need to include the Composer autoload.php file from somewhere within your WordPress installation.

Usage
-----

[](#usage)

Once the library is installed, you can access the namespaced methods by adding them to the top of your PHP file, or by calling the full namespaced method:

```
use function WDS\Utils\PluginPathFinder\get_plugin_dir;
use function WDS\Utils\PluginPathFinder\get_plugin_url;

...

function some_function() {
    $dir = get_plugin_dir( __FILE__ );
    $url = get_plugin_url( $dir . '/assets/some-asset.css' );
}

```

*IMPORTANT: These methods must only be called after the `plugins_loaded`action, or PHP will throw a fatal error.*

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1871eb9cf5592f9aef06a1a2b2065ad6e24a0e5ddd7908c835a1f6d8ef4fa56e?d=identicon)[WebDevStudios](/maintainers/WebDevStudios)

### Embed Badge

![Health badge](/badges/webdevstudios-plugin-path-finder/health.svg)

```
[![Health](https://phpackages.com/badges/webdevstudios-plugin-path-finder/health.svg)](https://phpackages.com/packages/webdevstudios-plugin-path-finder)
```

###  Alternatives

[voku/portable-ascii

Portable ASCII library - performance optimized (ascii) string functions for php.

574401.5M117](/packages/voku-portable-ascii)[spatie/php-structure-discoverer

Automatically discover structures within your PHP application

17824.5M57](/packages/spatie-php-structure-discoverer)[laminas/laminas-uri

A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)

3834.9M89](/packages/laminas-laminas-uri)[remipelhate/distil

164.4k](/packages/remipelhate-distil)

PHPackages © 2026

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