Hi,
With PHP 8.2.x and WP 6.4.3
[16-Mar-2024 16:38:57 UTC] PHP Deprecated: Implicit conversion from float 90.29 to int loses precision in /home/public_html/wp-content/plugins/wp-memory-usage/wp-memory-usage.php on line 209
[16-Mar-2024 16:42:53 UTC] PHP Deprecated: Implicit conversion from float 88.29 to int loses precision in /home/public_html/wp-content/plugins/wp-memory-usage/wp-memory-usage.php on line 208
Thanks
]]>Despite editing the wp-config.php file (define(‘WP_MEMORY_LIMIT’, ‘256M’)) your plugin keeps returning a WP memory limit of 40MB (but shows that it is exceeding the memory limit by 203%). Is this a bug? Any suggestions how I can fix this?
WP Memory Limit: 81 of 40MB (203%)
PHP Memory Limit: 81 of 512MB (16%)
PHP: 8.1.23
Warning: Undefined array key “mb” in /wp-content/plugins/wp-memory-usage/wp-memory-usage.php on line 69
Warning: Undefined array key “unity” in /wp-content/plugins/wp-memory-usage/wp-memory-usage.php on line 70
]]>I found some UI strings cannot be translated, so I modified as the follows.
wp-memory-usage.php
Line 218
echo '<a href='.admin_url().'?c=st>'. __('Restart Measurement', 'wp-memory-usage'). '</a><hr>';
Line 220
echo '<a href='.admin_url().'?ac=stop>'. __('Stop Measurement', 'wp-memory-usage'). '</a><hr>';
Line 222
echo '<a href='.admin_url().'?c=st>'. __('Start Measurement', 'wp-memory-usage'). '</a><hr>';
Line 230
echo __('Number of measuring points: ', 'wp-memory-usage');
Line 243
echo __('Used MB', 'wp-memory-usage');
Line 245
echo sprintf(__('MB (max. %s)', 'wp-memory-usage'),$this->memory["wpmb"]. $this->memory["wpunity"]);
Line 247
echo __('%MB', 'wp-memory-usage');
Line 254
echo __('Average MB', 'wp-memory-usage');
Line 265
echo __('Min MB', 'wp-memory-usage');
Line 276
echo __('Max MB', 'wp-memory-usage');
Line 286
echo __('MB', 'wp-memory-usage');
Line 288
echo __('Occurrence', 'wp-memory-usage');
Line 336
$servertime = date(__('d.m.Y, H:i:s', 'wp-memory-usage'));
]]>
Is this plugin working with WordPress 6.1 and woocommerce 7.1.0?
]]>The plugin’s text domain should be the same with its owned slug, but the current text domain is incorrect in the source code.
For example, line 125 in wp-memory-usage.php should be the following.
<li><strong><?php echo __('Memory limits', 'wp-memory-usage'); ?></strong> : <span>
NOT current code like the following.
<li><strong><?php echo __('Memory limits', 'wp_memory_usage'); ?></strong> : <span>
Fix all wrong text domain then language pack can be displayed correctly (tested).
Regards,
Alex
There seems to be something wrong with the calculation of memory in usage (percentage). Simply have a look into the image attached….
]]>Thank you AlexRabe for the Plugin and transferring it to me.
Any wishes for improving the plugin?
Bernhard
]]>Replace these two lines
// Start this plugin once all other plugins are fully loaded
add_action( 'plugins_loaded', create_function('', '$memory = new wp_memory_usage();') );
with
// Start this plugin once all other plugins are fully loaded
//add_action( 'plugins_loaded', create_function('', '$memory = new wp_memory_usage();') );
add_action( 'plugins_loaded', function () { return $memory = new wp_memory_usage();}, 10);
]]>
thanks for these great plugin.
To solve the Redefining already defined constructor for class wp_memory_usage in …\plugins\wp-memory-usage-perso\wp-memory-usage.php on line 39, simply remove the following 35 to 37 lines in the file /wp-memory-usage.php
function wp_memory_usage() {
return $this->__construct();
}
]]>
Not sure if this is a problem, but I recently upgraded my test box from PHP 5.4.something (5.4.4?) to PHP 5.5.9 (It’s running on Ubuntu) and the reported amount of used PHP memory is really low.
Comparing a live site I have (same site on both machines), I get WP-Memory-Usage reporting ~24.5MB used on PHP 5.4.4, whereas on PHP 5.5.9 WP-Memory-Usage reports ~5.8MB used.
Now if that’s real usage then I’m definitely not going to complain (!), but if it’s misreporting something, is this fixable?
]]>Hello Alex. Hope you still maintain the plugin.
I noticed some time ago that PHP is throwing an error when the plugin is active. It says:
Redefining already defined constructor for class wp_memory_usage, at wp-content/plugins/wp-memory-usage/wp-memory-usage.php:39, which is called somewhere from within wp-settings.php
I’m running the sites on PHP 5.4.
You can find the error in the PHP errorlog or by using the Query Monitor plugin.
Can you check it out?
Thanks in advance!
Following message on a fresh local installation WP 3.9.1 after activating the plugin:
“Strict Standards: Redefining already defined constructor for class wp_memory_usage in …\xampp\htdocs\…\wp-content\plugins\wp-memory-usage\wp-memory-usage.php on line 39”
Hello,
I use WP-Memory-Usage on several pages and different hosting companies.
Usually it will tell me that the memory limit is 128, 256 etc. MB which fits the description of the packages I bought.
But on one page is says:
PHP Version : 5.3.26 / 64Bit OS
Memory limit : 268435456 MB
Memory usage : 39.55 MB
What does “Memory limit : 268435456 MB” mean please?
It is suppose to be 50 MB what I bought from them.
Hi,
On my local web site (a copy of the inline), with debug, it show these error :
Strict Standards: Redefining already defined constructor for class wp_memory_usage in C:\xampp-portable\htdocs\wordpress\wp-content\plugins\wp-memory-usage\wp-memory-usage.php on line 39
Hope you have time to look after that !
Great plugin congretulation !
Начиная с версии WordPress 3.8 стала некорректно отображаться полоса использования памяти, выровнена не по левому краю, а смещена вправо.
]]>Bar graph looks broken since WordPress 3.8
]]>The layout of the progress bar in WP 3.8 is broken. The incidator is aligned incorrectly. Can you maybe create a fix for that?
Thanks already!
]]>This plugin completely borked my system. Within a minute of hitting the stats page I had a 54 load (about 1,350% of my server’s capabilities) and was barely able to kill apache.
]]>No dashboard box. No footer status bar text.
]]>Does it mean that if your memory usage states its 30.9 mb.. would that be for the whole multisite network? or 30.9 mb on each blog under the network?
Please clarify.
Thanks.
Hi,
when Wp memory usage is activate with WP 3.1 it is impossible to download pics. the download window does not open. please fix these issue.