I started to use the plugin (v2.1.0) today on my server and noticed a little bug with the total amount of MBs available on the server.
The hosting package I use comes with 2GB and this translates into:
Memory: 12 of 2147483648 MB (0%) | WP LIMIT: 384 MB
2147483648 / 1024 / 1024 = 2048 MB = 2 GB
Also – wouldn’t it make more sense when the WP LIMIT is shown there instead so the usage is a % of the WP LIMIT?
So like: Memory: 12 of 384 MB (WP LIMIT) (0%) | Server Total: 2048 MB
To fix the bug:
Line 46 should be changed into:
$this->memory['limit'] = (int) ini_get('memory_limit') / 1024 / 1024;
And perhaps change line 55 into:
$this->memory['percent'] = round ($this->memory['usage'] / $this->memory['limit'] * 100, 1);
To show 1 decimal which would be useful in case of smaller percentages.
- The topic ‘Bug: incorrect server total MBs, and measure % against WP LIMIT instead’ is closed to new replies.