Thread Starter
alx359
(@alx359)
There’s also a mismatch of what version is minimum required to run this plugin:
\plugins\f12-profiler\Readme.txt line 7:
Requires PHP: 7.2
\plugins\f12-profiler\f12-profiler.php line 21:
define( ‘F12_PROFILER_MINIMUM_PHP_VERSION’, ‘7.0’ );
The plugin currently can’t be activated when PHP version < 7.2. Have tested with PHP 7.1.16 and it seems to work fine, so the Readme.txt file needs to be updated accordingly, as its header appears to be parsed by WP (5.2) during activation of the plugin.
Thread Starter
alx359
(@alx359)
Think resource colors in F12 are a bit off. A brighter (red) color should mean more time/resource hog. Would suggest tweaking those colors similarly as in Query Monitor, and as backgrounds for better contrast with some admin skins, i.e.:
\plugins\f12-profiler\f12-profiler.php line 71:
if ( $value > 0.1 ) {
$value = '<span style="flex:1 1 30%; color:#fff; background:#ff5500;">' . $value . 's</span>'; //instead of: cc0000,Seconds
} else if ( $value > 0.05 ) {
$value = '<span style="flex:1 1 30%; color:#fff; background:#cc0000;">' . $value . 's</span>'; //instead of: ff5500,Seconds
} else {
$value = '<span style="flex:1 1 30%; color:#fff; background:#009933;">' . $value . 's</span>'; //instead of: 00cc00,Seconds
}
Also please consider XXs instead of XX Seconds everywhere, as the shorthand saves valuable screen space, especially important in an already crowded admin header. Line 93:
'title' => F12_PROFILER_NAME . ': ' . number_format( $sum, 4 ) . 's' //instead of: 'Seconds'
Here’s an example of how all the tweaks above look like: screenshot
Dear @alx359,
thank you for your feedback. All of your feedback has been integrated within the new version 1.2 except the color of the times/tracking. Therefor if you update the plugin ensure you change the color of the tracking.
We also added a tracking for the js/css resources. The color for this fields are defined within the meassure.js file.
If you have any further suggestions do not hesitate to send them to us.
Best regards
Marc