Pro Reports - Pagespeed tokens bug


The tokens pagespeed.average.desktop and don’t work in Pro Reports,
no value is shown in the generated report (preview and pdf, in the site dashboard both scores are working).

In the mainwp_pro_reports_custom_tokens filter, both are not set in $tokens_values.

After more testing, i’m not sure if it’s a bug or the way tokens are loaded, but something is strange.

I wanted to hide rows with empty values in the General Information table.

So for example I made a token to display the Uptime row only if [aum.alltimeuptimeratio] contains a value in mainwp_pro_reports_custom_tokens.

The problem is, when removing the original row, it’s value is not loader in the mainwp_pro_reports_custom_tokens filter.

Is there a workaround for this ?

My current hack is to hide [aum.alltimeuptimeratio] somewhere in the template…


Hi @FeIix

Can you please post your report token and a community system report? We’d like first to make sure if it’s a bug or not.

The report is located in your Dashboard under Status → Server, on the top right of the page.

Be sure to use the button like the one below; this button hides all your private information:


Pressing the button auto-copies the report to your clipboard then just paste it in a reply here.

### Informations serveur           Obligatoire                                            Détecté                                      État     ###

MainWP Dashboard                   
Version de MainWP Dashboard        4.2.1                                                  4.2.1                                        Ok          
MainWP Upload Directory            Writable                                               Writable                                     Ok          
Extensions MainWP                  
Activity Log for MainWP            2.0.0                                                                                                           
Advanced Uptime Monitor Extension  5.2.2                                                  Licence d’API inactive                       Avertissement
MainWP White Label Extension       4.1.1                                                  Licence d’API inactive                       Avertissement
MainWP Code Snippets Extension     4.0.1                                                  Licence d’API inactive                       Avertissement
MainWP Favorites Extension         4.0.8                                                  Licence d’API inactive                       Avertissement
MainWP Google Analytics Extension  4.0.4                                                  Licence d’API inactive                       Avertissement
MainWP iThemes Security Extension  4.1                                                    Licence d’API inactive                       Avertissement
MainWP Lighthouse Extension        4.0                                                    Licence d’API inactive                       Avertissement
MainWP Maintenance Extension       4.1.1                                                  Licence d’API inactive                       Avertissement
MainWP Page Speed Extension                                                Licence d’API inactive                       Avertissement
MainWP Pro Reports Extension       4.0.8                                                  Licence d’API inactive                       Avertissement
MainWP Sucuri Extension            4.0.9                                                  Licence d’API inactive                       Avertissement
MainWP Team Control                4.0.2                                                  Licence d’API inactive                       Avertissement
MainWP UpdraftPlus Extension       4.0.5                                                  Licence d’API inactive                       Avertissement
MainWP WooCommerce Status Extension4.0.6                                                  Licence d’API inactive                       Avertissement
MainWP Wordfence Extension         4.0.5                                                  Licence d’API inactive                       Avertissement
WordPress Version                  >=3.6                                                  5.9.3                                        Ok          
WordPress Memory Limit             >=64M                                                  512M                                         Ok          
MultiSite Disabled                 =true                                                  true                                         Ok          
Méthode fichier système            = direct                                               direct                                       Ok          
PHP Version                        >=7.0                                                  7.4.27                                       Ok          
PHP Safe Mode Disabled             =true                                                  true                                         Ok          
PHP Max Execution Time             >=30 seconds                                           180                                          Ok          
PHP Max Input Time                 >=30 seconds                                           600                                          Ok          
PHP Memory Limit                   >=128M                                                 512M                                         Ok          
PCRE Backtracking Limit            >=10000                                                1000000                                      Ok          
PHP Upload Max Filesize            >=2M                                                   256M                                         Ok          
PHP Post Max Size                  >=2M                                                   128M                                         Ok          
SSL Extension Enabled              =true                                                  true                                         Ok          
SSL Warnings                       = empty                                                                                             Ok          
cURL Extension Enabled             =true                                                  true                                         Ok          
cURL Timeout                       >=300 seconds                                          60                                           Avertissement
cURL Version                       >=7.18.1                                               7.64.0                                       Ok          
cURL SSL Version                   >=OpenSSL/1.1.0                                        OpenSSL/1.1.1j                               Ok          
PHP autorise les URLs fopen        NON                                                    
Support PHP Exif                   OUI ( V7.4.)                                           
Support PHP IPTC                   OUI                                                    
Support PHP XML                    OUI                                                    
Fonctions PHP désactivées          , curl_multi_exec, exec, parse_ini_file, passthru, pcntl_alarm, pcntl_exec, pcntl_fork, pcntl_get_last_error, pcntl_getpriority, pcntl_setpriority, pcntl_signal, pcntl_signal_dispatch, pcntl_sigprocmask, pcntl_sigtimedwait, pcntl_sigwaitinfo, pcntl_strerror, pcntl_wait, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifstopped, pcntl_wstopsig, pcntl_wtermsig, popen, proc_open, shell_exec, show_source, system,
Extensions PHP chargées            Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, readline, session, shmop, sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, zlib
MySQL Version                      >=5.0                                                  5.7.33                                       Ok          
Encodage client MySQL              utf8                                                   
Informations serveur               
Logiciel du serveur                Apache                                                 
Système d'exploitation             Linux                                                  
Architecture                       64		 bit                                               
Protocole du serveur               HTTP/2.0                                               
HTTPS                              OUI                                                    
Connexion automatique du serveur   Réponse du corps HTTP non espérée :                    
Agent utilisateur                  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
Interface de passerelle            CGI/1.1                                                
Utilisation de la mémoire          16.94 MB                                               
Temps de la requête                1650380381                                             
Contenu accepté                    text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Jeu de caractère accepté pour le contenuIndisponible                                           
Réglages MainWP                    
Number of child sites              118                                                    
Use WP Cron                        Oui                                                    
Optimiser pour l'hébergement mutualisé ou les grands réseauxOui                                                    
WP Core advanced automatic updates enabledNon                                                    
Plugin advanced automatic updates enabledNon                                                    
Theme advanced automatic updates enabledNon                                                    
Tolérance d’abandon des extensions/thèmes365                                                    
Nombre maximal d’articles à retourner50                                                     
Nombre maximal de pages à retourner50                                                     
MainWP legacy backups enabled      Non                                                    
Système de sauvegarde principale   MainWP UpdraftPlus Extension                           
Basic uptime monitoring enabled    Non                                                    
Site health monitoring enabled     Non                                                    
Requêtes simultanées maximum       3                                                      
Délai minimum entre les requêtes   300                                                    
Requêtes simultanées maximum par IP1                                                      
Délai minimum entre les requêtes vers la même IP1500                                                   
Nombre maximum de requêtes de synchronisation simultanées3                                                      
Nombre maximal de requêtes d’installation et de mise à jour simultanées3                                                      
REST API enabled                   Non                                                    
Cache control enabled              Oui                                                    
Extensions activées                
Activity Log for MainWP            2.0.0                                                  Actif                                        
AWA Repository for MainWP          0.1.2dev                                               Actif                                        
Loco Translate                     2.6.1                                                  Actif                                        
MainWP Dashboard                   4.2.1                                                  Actif                                        
UpdraftPlus - Backup/Restore       1.22.11                                                Actif                                        
WP Mail SMTP                       3.3.0                                                  Actif                                        

$lighthouse = $tokens['[lighthouse.performance.desktop]'] ?? '';

$tokens['[awa.lighthouse_main_score]'] = (empty($lighthouse) || ($lighthouse === 'N/A'))
    ? ''
    : '<tr><td>'.__('Lighthouse Performance', 'mainwp-pro-reports-extension').'</td><td>'.$lighthouse.' / 100</td></tr>';

($tokens being $tokens_values from mainwp_pro_reports_custom_tokens filter)

To reproduce :

  • Add this token in mainwp_pro_reports_custom_tokens
  • Add this token in a custom report template next to [lighthouse.performance.desktop]
  • Check preview : Both are working
  • Delete the original [lighthouse.performance.desktop], keep the new token
  • Check preview : Both disappeared

Hi @FeIix,

Would you mind opening a private Help Desk ticket so we can collect some additional information & investigate further?


Hi, I just opened a ticket linking to this thread, with another account (pro account of the company i’m working for)

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.