WP-Memory-Usage - Version 1.2.6

Version Description

  • Fixed translation bug
  • New screenshots
  • Plugin ok with Worpdress 5.9.3
Download this release

Release Info

Developer berkux
Plugin Icon 128x128 WP-Memory-Usage
Version 1.2.6
Comparing to
See all releases

Code changes from version 1.2.5 to 1.2.6

Files changed (4) hide show
  1. readme.txt +8 -13
  2. screenshot-1.jpg +0 -0
  3. screenshot-2.jpg +0 -0
  4. wp-memory-usage.php +17 -33
readme.txt CHANGED
@@ -2,10 +2,9 @@
2
  Contributors: berkux
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=APWXWK3DF2E22
4
  Tags: memory, admin, php, memory-limit, ip, ips, adress, php, server, info
5
- Requires PHP: 5.3.0
6
  Requires at least: 5.3
7
- Tested up to: 5.9
8
- Stable tag: 1.2.5
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -13,16 +12,7 @@ Show up the PHP version, memory limit and current memory usage in the dashboard
13
 
14
  == Description ==
15
 
16
- * Purpose of the plugin
17
- You can simple measure the settings of your Webserver and Wordpress-Installation. This is very helppful to check the requirements of your Website, your Wordpress and it's plugins
18
-
19
- * What is displayed?
20
- PHP version, memory limit and current memory usage
21
-
22
- * Where is it displayed?
23
- On the dashboard and the admin footer.
24
-
25
- * History of the Plugin
26
  <a href="https://profiles.wordpress.org/alexrabe/">The plugin was transferred from alexrabe to berkux on Jan 2 2022</a>
27
 
28
  == Credits ==
@@ -36,6 +26,11 @@ Copyright 2009-2013 by Alex Rabe, 2022- Bernhard Kux
36
  1. Screenshot Admin footer
37
 
38
  == Changelog ==
 
 
 
 
 
39
  = 1.2.5 =
40
  * Plugin prepared for Translation, PO-File and de_DE-MO-File added
41
  * Wordpress-Multisite-Installations: Plugin now also in Network-Dashboard
2
  Contributors: berkux
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=APWXWK3DF2E22
4
  Tags: memory, admin, php, memory-limit, ip, ips, adress, php, server, info
 
5
  Requires at least: 5.3
6
+ Tested up to: 6.0
7
+ Stable tag: 1.2.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ Show up the PHP version, memory limit and current memory usage in the dashboard and admin footer. You can now simple measure the requirements of your plugins and language files.
 
 
 
 
 
 
 
 
 
16
  <a href="https://profiles.wordpress.org/alexrabe/">The plugin was transferred from alexrabe to berkux on Jan 2 2022</a>
17
 
18
  == Credits ==
26
  1. Screenshot Admin footer
27
 
28
  == Changelog ==
29
+ = 1.2.6 =
30
+ * Fixed translation bug
31
+ * New screenshots
32
+ * Plugin ok with Worpdress 5.9.3
33
+
34
  = 1.2.5 =
35
  * Plugin prepared for Translation, PO-File and de_DE-MO-File added
36
  * Wordpress-Multisite-Installations: Plugin now also in Network-Dashboard
screenshot-1.jpg CHANGED
Binary file
screenshot-2.jpg CHANGED
Binary file
wp-memory-usage.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP-Memory-Usage
4
  Plugin URI: https://www.json-content-importer.com
5
  Description: Show up memory limits, current memory usage, IP-Address, PHP-Version in the dashboard and admin footer
6
  Author: Bernhard Kux
7
- Version: 1.2.5
8
  Author URI: https://www.json-content-importer.com
9
  Text Domain: wp-memory-usage
10
  Domain Path: /languages/
@@ -31,23 +31,7 @@ if ( is_admin() ) {
31
  ).'/languages/';
32
 
33
  $id = "wp-memory-usage";
34
-
35
- # $loaderrorlevel = load_plugin_textdomain('wp-memory-usage', false, $pd);
36
  $loaderrorlevel = load_plugin_textdomain($id, false, $pd);
37
-
38
- $mof = WP_PLUGIN_DIR."/$pd/$id"."_de_DE.mo";
39
- if (file_exists($mof)) {
40
-
41
- } else {
42
-
43
- }
44
-
45
- if ($loaderrorlevel) {
46
-
47
- } else {
48
-
49
- }
50
-
51
  }
52
  add_action('plugins_loaded', 'wp_memory_usage_i18n_init');
53
 
@@ -112,31 +96,31 @@ if ( is_admin() ) {
112
  $this->check_memory_usage();
113
  ?>
114
  <ul>
115
- <li><strong><?php echo __('PHP Version', 'wp_memory_usage'); ?>:</strong> <span><?php
116
- echo PHP_VERSION; ?>&nbsp;/&nbsp;<?php echo (PHP_INT_SIZE * 8) . __('Bit OS', 'wp_memory_usage');
117
 
118
  if (!is_null(ini_get('max_execution_time'))) {
119
- $max_execution_time = (int) ini_get('max_execution_time'). __('sec', 'wp_memory_usage');
120
- echo " / ".__('Max execution time: ', 'wp_memory_usage').$max_execution_time;
121
  }
122
 
123
 
124
  ?></span></li>
125
- <li><strong><?php echo __('Memory limits', 'wp_memory_usage'); ?></strong> : <span>
126
  <?php
127
  if ($this->memory["wpmb"]!="") {
128
- echo __('Wordpress', 'wp_memory_usage').' '.$this->memory["wpmb"]. $this->memory["wpunity"]." / ";
129
  }
130
  #if ($this->memory["wpmaxmb"]!="") {
131
- # echo __('Wordpress-Admin', 'wp_memory_usage').' '.$this->memory["wpmaxmb"]. $this->memory["wpmaxunity"]." / ";
132
  #}
133
  if ($this->memory['phplimit']!="") {
134
- echo __('PHP ', 'wp_memory_usage').' '.$this->memory['phplimit'].$this->memory['phplimitunity'];
135
  }
136
  ?>
137
  </span></li>
138
- <li><strong><?php echo __('Memory usage', 'wp_memory_usage'); ?></strong> : <span><?php echo $this->memory['usage']."MB"; ?>
139
- <!--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?PHP #echo "<strong>".__( 'IP-Address', 'wp_memory_usage') . " " . $this->servername. ':</strong> '.$this->ipadr; ?>-->
140
  </span></li>
141
  </ul>
142
  <?php if (!empty($this->memory['percent'])) : ?>
@@ -152,8 +136,8 @@ if ( is_admin() ) {
152
  }
153
 
154
  public function add_dashboard() {
155
- $servertime = date("j.M Y, H:i:s");
156
- wp_add_dashboard_widget( 'wp_memory_dashboard', __('Memory Overview', 'wp_memory_usage')." / ".__('Servertime', 'wp_memory_usage').": ".$servertime, array (&$this, 'dashboard_output') );
157
  }
158
 
159
  private function formatWP_MEMORY_LIMIT($valin) { #WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT come with size and unity
@@ -183,10 +167,10 @@ if ( is_admin() ) {
183
 
184
  public function add_footer($content) {
185
  $this->check_memory_usage();
186
- $content .= ' | '. __( 'WP Memory Limit:', 'wp_memory_usage'). ' ' . $this->memory['usage'] . ' ' . __( 'of', 'wp_memory_usage') . ' ' . $this->memory["wpmb"].$this->memory["wpunity"]. " (".$this->memory['percent']."%)";
187
- $content .= ' | '. __( 'PHP Memory Limit:', 'wp_memory_usage'). ' ' . $this->memory['usage'] . ' ' . __( 'of', 'wp_memory_usage') . ' ' . $this->memory['phplimit'].$this->memory['phplimitunity']. " (".$this->memory['percentphp']."%)";
188
- $content .= ' | '. __( 'IP-Address', 'wp_memory_usage') . " " . $this->servername. ': '.$this->ipadr;
189
- $content .= ' | '. __( 'PHP', 'wp_memory_usage') . ": " . PHP_VERSION;
190
  return $content;
191
  }
192
 
4
  Plugin URI: https://www.json-content-importer.com
5
  Description: Show up memory limits, current memory usage, IP-Address, PHP-Version in the dashboard and admin footer
6
  Author: Bernhard Kux
7
+ Version: 1.2.6
8
  Author URI: https://www.json-content-importer.com
9
  Text Domain: wp-memory-usage
10
  Domain Path: /languages/
31
  ).'/languages/';
32
 
33
  $id = "wp-memory-usage";
 
 
34
  $loaderrorlevel = load_plugin_textdomain($id, false, $pd);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
  add_action('plugins_loaded', 'wp_memory_usage_i18n_init');
37
 
96
  $this->check_memory_usage();
97
  ?>
98
  <ul>
99
+ <li><strong><?php echo __('PHP Version', 'wp-memory-usage'); ?>:</strong> <span><?php
100
+ echo PHP_VERSION; ?>&nbsp;/&nbsp;<?php echo (PHP_INT_SIZE * 8) . __('Bit OS', 'wp-memory-usage');
101
 
102
  if (!is_null(ini_get('max_execution_time'))) {
103
+ $max_execution_time = (int) ini_get('max_execution_time'). __('sec', 'wp-memory-usage');
104
+ echo " / ".__('Max execution time: ', 'wp-memory-usage').' '.$max_execution_time;
105
  }
106
 
107
 
108
  ?></span></li>
109
+ <li><strong><?php echo __('Memory limits', 'wp-memory-usage'); ?>:</strong> <span>
110
  <?php
111
  if ($this->memory["wpmb"]!="") {
112
+ echo __('Wordpress', 'wp-memory-usage').' '.$this->memory["wpmb"]. $this->memory["wpunity"]." / ";
113
  }
114
  #if ($this->memory["wpmaxmb"]!="") {
115
+ # echo __('Wordpress-Admin', 'wp-memory-usage').' '.$this->memory["wpmaxmb"]. $this->memory["wpmaxunity"]." / ";
116
  #}
117
  if ($this->memory['phplimit']!="") {
118
+ echo __('PHP ', 'wp-memory-usage').' '.$this->memory['phplimit'].$this->memory['phplimitunity'];
119
  }
120
  ?>
121
  </span></li>
122
+ <li><strong><?php echo __('Memory usage', 'wp-memory-usage'); ?>:</strong> <span><?php echo $this->memory['usage']."MB"; ?>
123
+ <!--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?PHP #echo "<strong>".__( 'IP-Address', 'wp-memory-usage') . " " . $this->servername. ':</strong> '.$this->ipadr; ?>-->
124
  </span></li>
125
  </ul>
126
  <?php if (!empty($this->memory['percent'])) : ?>
136
  }
137
 
138
  public function add_dashboard() {
139
+ $servertime = date("d.m Y, H:i:s");
140
+ wp_add_dashboard_widget( 'wp_memory_dashboard', __('Memory Overview', 'wp-memory-usage')."<br>".__('Servertime', 'wp-memory-usage').": ".$servertime, array (&$this, 'dashboard_output') );
141
  }
142
 
143
  private function formatWP_MEMORY_LIMIT($valin) { #WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT come with size and unity
167
 
168
  public function add_footer($content) {
169
  $this->check_memory_usage();
170
+ $content .= ' | '. __( 'WP Memory Limit:', 'wp-memory-usage'). ' ' . $this->memory['usage'] . ' ' . __( 'of', 'wp-memory-usage') . ' ' . $this->memory["wpmb"].$this->memory["wpunity"]. " (".$this->memory['percent']."%)";
171
+ $content .= ' | '. __( 'PHP Memory Limit:', 'wp-memory-usage'). ' ' . $this->memory['usage'] . ' ' . __( 'of', 'wp-memory-usage') . ' ' . $this->memory['phplimit'].$this->memory['phplimitunity']. " (".$this->memory['percentphp']."%)";
172
+ $content .= ' | '. __( 'IP-Address', 'wp-memory-usage') . " " . $this->servername. ': '.$this->ipadr;
173
+ $content .= ' | '. __( 'PHP', 'wp-memory-usage') . ": " . PHP_VERSION;
174
  return $content;
175
  }
176