rackerlabs/ohai-plugins — pull request #59 by ryandub (2014-04-02 03:51:34+00:00)
Title: Wordpress Plugin

Plugin that iterates (Apache for now) configured vhosts and looks for WordPress content. If found, it attempts to report WordPress version and plugins versions:

```
"webapps": {
"wordpress": {
"wordpress.example.com": {
"path": "/srv/wordpress_sample/wp-config.php",
"version": "3.8.1",
"plugins": {
"Akismet": {
"version": "2.5.9"
}
}
}
}
}
```

Concerns:
* Could cause too much filesystem activity. Currently, plugin scans entire vhost directory for `wp-config.php` with some configured standard exclude directories (`.git`, `images`, etc.). Needs better recursive logic.
* Plugins scan looks at each plugin directory and scans all files in the top level of this directory looking for required WordPress plug-in metadata. Unfortunately, there is no convention on what file it is found in. However, once `name` and `version` are found, it stops scanning that file and that plug-in.
* If multiple vhosts are configured and point to the same docroot with WordPress, this will cause multiple entries in the `webapps/wordpress` namespace because it keys off of vhost name.