After adding #{datastore['PLUGINSPATH']} to the uri string, it should be checked against finishing with "/" again, I think it would be nicher:

```ruby
uri = target_uri.path
uri << '/' if uri[-1,1] != '/'
uri << datastore['PLUGINSPATH']
uri << '/' if uri[-1,1] != '/'
```

Later on send_request_cgi you just use:

```ruby
'uri'    => "#{uri}advanced-custom-fields/core/api.php"
```