shahariaazam / wp-rank-checker
Check ranks for your plugins or themes with specific keyword and check how your plugins and themes are growing in WordPress public repository.
Requires
- psr/cache: ^1.0
- shahariaazam/http-client-support: ^1.0
- symfony/css-selector: ^4.4
- symfony/dom-crawler: ^4.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- php-http/guzzle6-adapter: ^2.0
- phpunit/phpunit: ^8.5
- squizlabs/php_codesniffer: ^3.5
- symfony/cache: ^4.4
This package is auto-updated.
Last update: 2024-11-29 05:33:34 UTC
README
Check ranks for your plugins or themes with specific keyword and check how your plugins and themes are growing in WordPress public repository. This library will calculate the search result ranking from WordPress.org plugin repository search page.
Installation
You can add this as a composer package. So to add this package in your application, just run the following command.
composer require shahariaazam/wp-rank-checker
Usage
Easy to use. Following code snippet will give you an idea about how to get ranking position of any specific plugin for any specific keyword.
<?php use Http\Adapter\Guzzle6\Client; use ShahariaAzam\WPRankChecker\RankChecker; use ShahariaAzam\WPRankChecker\RankCheckerException; use Symfony\Component\Cache\Adapter\FilesystemAdapter; require "vendor/autoload.php"; $httpClient = new Client(); $cacheProvider = new FileSystemAdapter(); $rankChecker = new RankChecker($httpClient, $cacheProvider); try { $result = $rankChecker ->setKeyword("mail") ->checkRanks(); // Get rank of your plugins for keyword "mail" print_r($result->getRankBySlug('wp-mail-gateway')); // will return integer print_r($result->getResults()); // will return a list of all plugins with search result position } catch (RankCheckerException $e) { echo $e->getMessage(); }
Issues
If you find any issues, please create an issue from here
Contribution
Any kinds of help to improve this library is welcome. Do something amazing and open a PR. I would be happy to review and merge.
Contributor
Full list of contributors can be found from here