Server IP & Memory Usage Display - Version 1.2.0

Version Description

  • Added display of WordPress Memory Limit information (parameter WP_MEMORY_LIMIT of wp-config.php). You can set this parameter in wp-config.php by adding this line: define( 'WP_MEMORY_LIMIT', '768M' ); and replacing 768M with the memory limit you want to set.
Download this release

Release Info

Developer apasionados
Plugin Icon 128x128 Server IP & Memory Usage Display
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.0 to 1.2.0

lang/server-ip-memory-usage-es_ES.mo CHANGED
Binary file
lang/server-ip-memory-usage-es_ES.po CHANGED
@@ -1,25 +1,25 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: ip-address-memory-usage\n"
4
- "POT-Creation-Date: 2014-12-09 20:59+0100\n"
5
- "PO-Revision-Date: 2014-12-09 20:59+0100\n"
6
  "Last-Translator: Ramon <marketing@apasionados.es>\n"
7
  "Language-Team: Apasionados <info@apasionados.es>\n"
8
  "Language: es_ES\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7\n"
13
  "X-Poedit-KeywordsList: __;_;gettext;gettext_noop;_e\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
  "X-Poedit-SearchPath-1: ..\n"
17
 
18
- #: ../server-ip-memory-usage.php:25
19
  msgid "Server IP & Memory Usage Display"
20
  msgstr "Mostrar IP del servidor y uso de memoria"
21
 
22
- #: ../server-ip-memory-usage.php:25
23
  msgid ""
24
  "Show the memory limit, current memory usage and IP address in the admin "
25
  "footer."
@@ -28,10 +28,18 @@ msgstr ""
28
  "en el pie de la adminstración de WordPress para los usuarios que son "
29
  "adminstradores."
30
 
31
- #: ../server-ip-memory-usage.php:64
 
 
 
 
32
  msgid "Memory"
33
  msgstr "Memoria"
34
 
35
- #: ../server-ip-memory-usage.php:64
36
  msgid "of"
37
  msgstr "de"
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: ip-address-memory-usage\n"
4
+ "POT-Creation-Date: 2015-11-11 08:31+0100\n"
5
+ "PO-Revision-Date: 2015-11-11 08:31+0100\n"
6
  "Last-Translator: Ramon <marketing@apasionados.es>\n"
7
  "Language-Team: Apasionados <info@apasionados.es>\n"
8
  "Language: es_ES\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.6\n"
13
  "X-Poedit-KeywordsList: __;_;gettext;gettext_noop;_e\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
  "X-Poedit-SearchPath-1: ..\n"
17
 
18
+ #: ../server-ip-memory-usage.php:26
19
  msgid "Server IP & Memory Usage Display"
20
  msgstr "Mostrar IP del servidor y uso de memoria"
21
 
22
+ #: ../server-ip-memory-usage.php:26
23
  msgid ""
24
  "Show the memory limit, current memory usage and IP address in the admin "
25
  "footer."
28
  "en el pie de la adminstración de WordPress para los usuarios que son "
29
  "adminstradores."
30
 
31
+ #: ../server-ip-memory-usage.php:82
32
+ msgid "N/A"
33
+ msgstr "N/D"
34
+
35
+ #: ../server-ip-memory-usage.php:88
36
  msgid "Memory"
37
  msgstr "Memoria"
38
 
39
+ #: ../server-ip-memory-usage.php:88
40
  msgid "of"
41
  msgstr "de"
42
+
43
+ #: ../server-ip-memory-usage.php:88
44
+ msgid "WP LIMIT"
45
+ msgstr "LÍMITE WP"
readme.txt CHANGED
@@ -5,7 +5,7 @@ Author URI: http://apasionados.es/
5
  Tags: memory, memory-limit, ip, ips, admin, adress, php, server, info
6
  Requires at least: 3.0.1
7
  Tested up to: 4.3.0
8
- Stable tag: 1.1.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -13,13 +13,13 @@ Show the memory limit, current memory usage and IP address in the admin footer.
13
 
14
  == Description ==
15
 
16
- This plugin displays the memory limit, current memory usage, IP address and PHP version in the admin footer.
17
 
18
  There are four features we love:
19
 
20
  1) You can easily see in the admin footer the IP where this WordPress installation is running. Very useful if you have many WordPress installations across several servers and IP addresses.
21
 
22
- 2) The memory usage and total available memory to the WordPress installation is shown in the admin footer. If memory usage is over 75% the percentage is shown in a light red and if the memory usage is over 90% the percentage is shown in red. So you can allways control with one look if there is enough memory available or if action has to be taken.
23
 
24
  3) Besides the IP address and the memory you can also see the PHP version and the type of Operating System where it's running.
25
 
@@ -27,7 +27,7 @@ There are four features we love:
27
 
28
  = What can I do with this plugin? =
29
 
30
- This plugin displays the total memory, used memory, percentage of used memory, the IP address and the PHP version in the admin footer.
31
 
32
  = What ideas is this plugin based on? =
33
 
@@ -80,6 +80,9 @@ Of course we do. That's why we created it. ;-)
80
 
81
  == Changelog ==
82
 
 
 
 
83
  = 1.1.0 =
84
  * Changes for compatibility with PHP 7. Changed "function ip_address_memory_usage() {" to "public function __construct() {". Thanks to Sybre Waaijer for the fix.
85
 
@@ -101,8 +104,8 @@ Of course we do. That's why we created it. ;-)
101
 
102
  == Upgrade Notice ==
103
 
104
- = 1.1.0 =
105
- Compatibility with PHP 7.
106
 
107
  == Contact ==
108
 
5
  Tags: memory, memory-limit, ip, ips, admin, adress, php, server, info
6
  Requires at least: 3.0.1
7
  Tested up to: 4.3.0
8
+ Stable tag: 1.2.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
13
 
14
  == Description ==
15
 
16
+ This plugin displays the memory limit, current memory usage, WordPress Memory Limit, IP address and PHP version in the admin footer.
17
 
18
  There are four features we love:
19
 
20
  1) You can easily see in the admin footer the IP where this WordPress installation is running. Very useful if you have many WordPress installations across several servers and IP addresses.
21
 
22
+ 2) The memory usage and total available memory to the WordPress installation is shown in the admin footer. If memory usage is over 75% the percentage is shown in a light red and if the memory usage is over 90% the percentage is shown in red. So you can allways control with one look if there is enough memory available or if action has to be taken. It also displays the WordPress memory limit to give you more information.
23
 
24
  3) Besides the IP address and the memory you can also see the PHP version and the type of Operating System where it's running.
25
 
27
 
28
  = What can I do with this plugin? =
29
 
30
+ This plugin displays the total memory, used memory, percentage of used memory, WP memory limit, the IP address and the PHP version in the admin footer.
31
 
32
  = What ideas is this plugin based on? =
33
 
80
 
81
  == Changelog ==
82
 
83
+ = 1.2.0 =
84
+ * Added display of WordPress Memory Limit information (parameter WP_MEMORY_LIMIT of wp-config.php). You can set this parameter in wp-config.php by adding this line: *define( 'WP_MEMORY_LIMIT', '768M' );* and replacing 768M with the memory limit you want to set.
85
+
86
  = 1.1.0 =
87
  * Changes for compatibility with PHP 7. Changed "function ip_address_memory_usage() {" to "public function __construct() {". Thanks to Sybre Waaijer for the fix.
88
 
104
 
105
  == Upgrade Notice ==
106
 
107
+ = 1.2.0 =
108
+ * Added display of WordPress Memory Limit information (parameter WP_MEMORY_LIMIT of wp-config.php).
109
 
110
  == Contact ==
111
 
server-ip-memory-usage.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Server IP & Memory Usage Display
4
  Plugin URI: http://apasionados.es/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=server-ip-memory-usage-plugin
5
  Description: Show the memory limit, current memory usage and IP address in the admin footer.
6
- Version: 1.1.0
7
  Author: Apasionados, Apasionados del Marketing
8
  Author URI: http://apasionados.es
9
  Text Domain: server-ip-memory-usage
@@ -41,7 +41,7 @@ if ( is_admin() ) {
41
  add_filter( 'admin_footer_text', array (&$this, 'add_footer') );
42
  $this->memory = array();
43
  }
44
-
45
  function check_limit() {
46
  $this->memory['limit'] = (int) ini_get('memory_limit') ;
47
  }
@@ -58,10 +58,34 @@ if ( is_admin() ) {
58
  }
59
  }
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  function add_footer($content) {
62
  $this->check_memory_usage();
63
  $server_ip_address = $_SERVER[ 'SERVER_ADDR' ];
64
- $content .= ' | ' . __( 'Memory', 'server-ip-memory-usage' ) . ': ' . $this->memory['usage'] . ' ' . __( 'of', 'server-ip-memory-usage' ) . ' ' . $this->memory['limit'] . ' MB (<span style="' . $this->memory['color'] . '">' . $this->memory['percent'] . '%</span>) | IP ' . $server_ip_address . ' | PHP ' . PHP_VERSION . ' @' . (PHP_INT_SIZE * 8) . 'BitOS';
65
  return $content;
66
  }
67
 
3
  Plugin Name: Server IP & Memory Usage Display
4
  Plugin URI: http://apasionados.es/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=server-ip-memory-usage-plugin
5
  Description: Show the memory limit, current memory usage and IP address in the admin footer.
6
+ Version: 1.2.0
7
  Author: Apasionados, Apasionados del Marketing
8
  Author URI: http://apasionados.es
9
  Text Domain: server-ip-memory-usage
41
  add_filter( 'admin_footer_text', array (&$this, 'add_footer') );
42
  $this->memory = array();
43
  }
44
+
45
  function check_limit() {
46
  $this->memory['limit'] = (int) ini_get('memory_limit') ;
47
  }
58
  }
59
  }
60
 
61
+ function format_wp_limit( $size ) {
62
+ $value = substr( $size, -1 );
63
+ $return = substr( $size, 0, -1 );
64
+
65
+ switch ( strtoupper( $value ) ) {
66
+ case 'P' :
67
+ $return*= 1024;
68
+ case 'T' :
69
+ $return*= 1024;
70
+ case 'G' :
71
+ $return*= 1024;
72
+ case 'M' :
73
+ $return*= 1024;
74
+ case 'K' :
75
+ $return*= 1024;
76
+ }
77
+ return $return;
78
+ }
79
+ function check_wp_limit() {
80
+ $memory = $this->format_wp_limit( WP_MEMORY_LIMIT );
81
+ $memory = size_format( $memory );
82
+ return ($memory) ? $memory : __( 'N/A', 'server-ip-memory-usage' );
83
+ }
84
+
85
  function add_footer($content) {
86
  $this->check_memory_usage();
87
  $server_ip_address = $_SERVER[ 'SERVER_ADDR' ];
88
+ $content .= ' | ' . __( 'Memory', 'server-ip-memory-usage' ) . ': ' . $this->memory['usage'] . ' ' . __( 'of', 'server-ip-memory-usage' ) . ' ' . $this->memory['limit'] . ' MB (<span style="' . $this->memory['color'] . '">' . $this->memory['percent'] . '%</span>) | ' . __( 'WP LIMIT', 'server-ip-memory-usage' ) . ': ' . $this->check_wp_limit() . ' | IP ' . $server_ip_address . ' | PHP ' . PHP_VERSION . ' @' . (PHP_INT_SIZE * 8) . 'BitOS';
89
  return $content;
90
  }
91