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 8y 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 3w 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

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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

[bootflat/bootflat

An open source Flat UI KIT based on Bootstrap (3.3.0). A faster, easier and less repetitive way for web developers to create elegant web apps.

4.2k3.3k](/packages/bootflat-bootflat)[goalgorilla/social_template

Social project template for composer based Open Social projects.

3545.0k](/packages/goalgorilla-social-template)[motomedialab/simple-laravel-audit

A simple audit helper that integrates directly with Laravel &amp; FilamentPHP

264.1k](/packages/motomedialab-simple-laravel-audit)[luchavez/boilerplate-generator

A boilerplate generator for building packages and implementing DDD on Laravel 8|9|10.

111.7k2](/packages/luchavez-boilerplate-generator)

PHPackages © 2026

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