47 lines
2.7 KiB
Markdown
47 lines
2.7 KiB
Markdown

|
||
|
||
# Laps — light WordPress profiler
|
||
|
||
_Make a site, make it fast._
|
||
|
||
[](https://scrutinizer-ci.com/g/Rarst/laps/?branch=master)
|
||
[](https://scrutinizer-ci.com/g/Rarst/laps/build-status/master)
|
||
[](https://scrutinizer-ci.com/g/Rarst/laps/?branch=master)
|
||
[](https://packagist.org/packages/rarst/laps)
|
||
[](https://packagist.org/packages/rarst/laps)
|
||
[](https://packagist.org/packages/rarst/laps)
|
||
[](https://github.com/php-pds/skeleton)
|
||
[](https://www.rarst.net/download/laps)
|
||
|
||
Laps is a plugin that **shows performance information** about WordPress page load.
|
||
|
||
It provides a visual summary in toolbar that is quick and easy to inspect.
|
||
|
||
## Page profiling
|
||
|
||
Laps automatically tracks many events, such as:
|
||
- PHP, core, plugins, and themes load, main posts loop, sidebars
|
||
- database queries (with [`SAVEQUERIES` constant](http://codex.wordpress.org/Editing_wp-config.php#Save_queries_for_analysis) enabled)
|
||
- network requests to other sites
|
||
|
||
## API profiling
|
||
|
||
For Ajax and REST API — Laps outputs performance information by Server Timing API, for use with clients such as Chrome Dev Tools.
|
||
|
||

|
||
|
||
### API authentication
|
||
|
||
API requests need to be authenticated as admin for performance data to be sent. For Ajax requests cookies are sufficient. REST API requests also [need nonce passed](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#cookie-authentication).
|
||
|
||
`laps_can_see` check can be filtered to relax required permissions on the plugin’s side.
|
||
|
||
## Installation
|
||
|
||
| [Composer](https://getcomposer.org/) (recommended) | Release archive |
|
||
| -------------------------------------------------- | -------- |
|
||
| `composer require rarst/laps` | [](https://www.rarst.net/download/laps) |
|
||
|
||
## License
|
||
|
||
MIT |