Title: MIssing token and misused functions
Last modified: August 22, 2016

---

# MIssing token and misused functions

 *  [Julio Potier](https://wordpress.org/support/users/juliobox/)
 * (@juliobox)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/missing-token-and-misused-functions/)
 * Hello Dareboost
 * Nice plugin, it will help people to improve their website.
 * However, here’s some point you have to work on:
    – get_bloginfo(‘language’) -
   > use get_locale() instead, this is the right way to get this value correctly.–
   get_site_url() -> your comment says “// get the url of the home page” but site_url!
   = home_url. – dbwp_new_analysis() -> this function is called by ajax when a user
   is logged in (hook wp_ajax_new_analysis) so even a subscriber can launch it, 
   you have to set a nonce token. – dbwp_get_report() -> same – dbwp_get_image_gauge_link()-
   > you’re using Curl even if the website can’t use it, you have to use the HTTP
   API from WP, check wp_remote_get or _head, _post etc – $json_response[‘report’][‘
   summary’][‘requestsCount’] . __(‘ requetes’,self::DBWP_TEXT_DOMAIN); -> sprintf(
   __(‘%d requetes’,self::DBWP_TEXT_DOMAIN), $json_response[‘report’][‘summary’][‘
   requestsCount’] ); – self::DBWP_TEXT_DOMAIN -> technically you have to hardcode
   the real domain into a string – $tipsFormated .= ‘<span class=”dbwp_bold”>’ .
   __(‘Priority’,self::DBWP_TEXT_DOMAIN) . ‘ ‘ . ($i+1) . __(‘: ‘,self::DBWP_TEXT_DOMAIN).‘
   </span>’ . $tips[$i][‘name’] . ‘‘; -> no no no what’s that l10n! “__(‘: ‘,self::
   DBWP_TEXT_DOMAIN)” really?? $tipsFormated .= ‘<span class=”dbwp_bold”>’ . sprintf(
   __(‘Priority %d:’,self::DBWP_TEXT_DOMAIN), $i+1 ) . ‘</span>’ . $tips[$i][‘name’].‘‘;
   and same for __(‘Page is fully loaded’,self::DBWP_TEXT_DOMAIN) . ‘* ‘ . round(
   $fullyLoaded) . __(‘ ms’,self::DBWP_TEXT_DOMAIN) etc, you move – There is a lack
   of data type check. – Too much () like ($i+1), this is useless to cast this as
   a variable, bad php perf.
 * Since we’re french and we know you (wp-rocket ;p), if you need help, poke me @
   boiteaweb
 * See you 🙂
 * [https://wordpress.org/plugins/performance-tester/](https://wordpress.org/plugins/performance-tester/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [DareBoost](https://wordpress.org/support/users/dareboost/)
 * (@dareboost)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/missing-token-and-misused-functions/#post-5722790)
 * Hello Julio
 * Thanks a lot for your feedbacks.
    We will fix all of this as soon as possible.
   By the way, we would be glad to have you as our first commiter to the plugin 
   on [github](https://github.com/DareBoost/performance-tester). 😉
 * See you.
 *  Thread Starter [Julio Potier](https://wordpress.org/support/users/juliobox/)
 * (@juliobox)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/missing-token-and-misused-functions/#post-5722805)
 * Why not, what do you want me to push first?
 *  Thread Starter [Julio Potier](https://wordpress.org/support/users/juliobox/)
 * (@juliobox)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/missing-token-and-misused-functions/#post-5722806)
 * Why not, what do you want me to push first?
 *  Plugin Author [DareBoost](https://wordpress.org/support/users/dareboost/)
 * (@dareboost)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/missing-token-and-misused-functions/#post-5722817)
 * Push what you want to.
    We’ll do what’s left. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘MIssing token and misused functions’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/performance-tester.svg)
 * [Performance Tester](https://wordpress.org/plugins/performance-tester/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/performance-tester/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/performance-tester/)
 * [Active Topics](https://wordpress.org/support/plugin/performance-tester/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/performance-tester/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/performance-tester/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [DareBoost](https://wordpress.org/support/users/dareboost/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/missing-token-and-misused-functions/#post-5722817)
 * Status: not resolved