Server IP & Memory Usage Display - Version 2.0.1

Version Description

  • Changed memory information display to use memory_get_peak_usage().
Download this release

Release Info

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

Code changes from version 2.0.0 to 2.0.1

lang/server-ip-memory-usage-es_ES.mo CHANGED
Binary file
lang/server-ip-memory-usage-es_ES.po CHANGED
@@ -1,75 +1,68 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: ip-address-memory-usage\n"
4
- "POT-Creation-Date: 2017-03-27 21:06+0200\n"
5
- "PO-Revision-Date: 2017-03-27 21:10+0200\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.12\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."
26
- msgstr ""
27
- "Muestra la memoria disponible, el uso actual de la misma y la dirección IP "
28
- "en el pie de la adminstración de WordPress para los usuarios que son "
29
- "adminstradores."
30
-
31
- #: ../server-ip-memory-usage.php:90
32
- msgid "N/A"
33
- msgstr "N/D"
34
-
35
- #: ../server-ip-memory-usage.php:101
36
- msgid "Memory"
37
- msgstr "Memoria"
38
-
39
- #: ../server-ip-memory-usage.php:101
40
- msgid "of"
41
- msgstr "de"
42
-
43
- #: ../server-ip-memory-usage.php:101
44
- msgid "Peak"
45
- msgstr "Máximo"
46
-
47
- #: ../server-ip-memory-usage.php:101
48
- msgid "WP LIMIT"
49
- msgstr "LÍMITE WP"
50
-
51
- #: ../server-ip-memory-usage.php:121
52
- msgid "Could not activate plugin: PHP version error"
53
- msgstr "No se ha podido activar el plugin: Error de versión PHP"
54
-
55
- #: ../server-ip-memory-usage.php:121
56
- msgid "You are using PHP version"
57
- msgstr "Estás usando la versión de PHP"
58
-
59
- #: ../server-ip-memory-usage.php:121
60
- msgid "This plugin has been tested with PHP versions 5.3 and greater."
61
- msgstr "Este plugin ha sido probado versiones de PHP 5.3 y superiores."
62
-
63
- #: ../server-ip-memory-usage.php:121
64
- msgid ""
65
- "WordPress itself <a href=\"https://wordpress.org/about/requirements/\" "
66
- "target=\"_blank\">recommends using PHP version 7 or greater</a>. Please "
67
- "upgrade your PHP version or contact your Server administrator."
68
- msgstr ""
69
- "WordPress <a href=\"https://wordpress.org/about/requirements/\" target="
70
- "\"_blank\">recomienda el uso de PHP versión 7 o superior</a> . Por favor, "
71
- "actualiza tu versión de PHP o ponte en contacto con el administrador del "
72
- "servidor."
73
-
74
- #~ msgid "Memory Peak"
75
- #~ msgstr "Máximo uso memoria"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: ip-address-memory-usage\n"
4
+ "POT-Creation-Date: 2016-12-27 11:04+0100\n"
5
+ "PO-Revision-Date: 2016-12-27 11:04+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.11\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."
26
+ msgstr ""
27
+ "Muestra la memoria disponible, el uso actual de la misma y la dirección IP "
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:92
36
+ msgid "Memory"
37
+ msgstr "Memoria"
38
+
39
+ #: ../server-ip-memory-usage.php:92
40
+ msgid "of"
41
+ msgstr "de"
42
+
43
+ #: ../server-ip-memory-usage.php:92
44
+ msgid "WP LIMIT"
45
+ msgstr "LÍMITE WP"
46
+
47
+ #: ../server-ip-memory-usage.php:112
48
+ msgid "Could not activate plugin: PHP version error"
49
+ msgstr "No se ha podido activar el plugin: Error de versión PHP"
50
+
51
+ #: ../server-ip-memory-usage.php:112
52
+ msgid "You are using PHP version"
53
+ msgstr "Estás usando la versión de PHP"
54
+
55
+ #: ../server-ip-memory-usage.php:112
56
+ msgid "This plugin has been tested with PHP versions 5.3 and greater."
57
+ msgstr "Este plugin ha sido probado versiones de PHP 5.3 y superiores."
58
+
59
+ #: ../server-ip-memory-usage.php:112
60
+ msgid ""
61
+ "WordPress itself <a href=\"https://wordpress.org/about/requirements/\" "
62
+ "target=\"_blank\">recommends using PHP version 7 or greater</a>. Please "
63
+ "upgrade your PHP version or contact your Server administrator."
64
+ msgstr ""
65
+ "WordPress <a href=\"https://wordpress.org/about/requirements/\" target="
66
+ "\"_blank\">recomienda el uso de PHP versión 7 o superior</a> . Por favor, "
67
+ "actualiza tu versión de PHP o ponte en contacto con el administrador del "
68
+ "servidor."
 
 
 
 
 
 
 
lang/server-ip-memory-usage.pot CHANGED
@@ -3,20 +3,20 @@ msgid ""
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Server IP & Memory Usage Display\n"
6
- "POT-Creation-Date: 2017-03-27 21:08+0200\n"
7
  "PO-Revision-Date: 2016-12-27 11:05+0100\n"
8
  "Last-Translator: Ramon <marketing@apasionados.es>\n"
9
  "Language-Team: Ramon <marketing@apasionados.es>\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 1.8.12\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-WPHeader: server-ip-memory-usage.php\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
18
- "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
19
- "_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
@@ -32,39 +32,35 @@ msgid ""
32
  "footer."
33
  msgstr ""
34
 
35
- #: server-ip-memory-usage.php:90
36
  msgid "N/A"
37
  msgstr ""
38
 
39
- #: server-ip-memory-usage.php:101
40
  msgid "Memory"
41
  msgstr ""
42
 
43
- #: server-ip-memory-usage.php:101
44
  msgid "of"
45
  msgstr ""
46
 
47
- #: server-ip-memory-usage.php:101
48
- msgid "Peak"
49
- msgstr ""
50
-
51
- #: server-ip-memory-usage.php:101
52
  msgid "WP LIMIT"
53
  msgstr ""
54
 
55
- #: server-ip-memory-usage.php:121
56
  msgid "Could not activate plugin: PHP version error"
57
  msgstr ""
58
 
59
- #: server-ip-memory-usage.php:121
60
  msgid "You are using PHP version"
61
  msgstr ""
62
 
63
- #: server-ip-memory-usage.php:121
64
  msgid "This plugin has been tested with PHP versions 5.3 and greater."
65
  msgstr ""
66
 
67
- #: server-ip-memory-usage.php:121
68
  msgid ""
69
  "WordPress itself <a href=\"https://wordpress.org/about/requirements/\" "
70
  "target=\"_blank\">recommends using PHP version 7 or greater</a>. Please "
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Server IP & Memory Usage Display\n"
6
+ "POT-Creation-Date: 2016-12-27 11:05+0100\n"
7
  "PO-Revision-Date: 2016-12-27 11:05+0100\n"
8
  "Last-Translator: Ramon <marketing@apasionados.es>\n"
9
  "Language-Team: Ramon <marketing@apasionados.es>\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.11\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-WPHeader: server-ip-memory-usage.php\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
18
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
19
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
32
  "footer."
33
  msgstr ""
34
 
35
+ #: server-ip-memory-usage.php:82
36
  msgid "N/A"
37
  msgstr ""
38
 
39
+ #: server-ip-memory-usage.php:92
40
  msgid "Memory"
41
  msgstr ""
42
 
43
+ #: server-ip-memory-usage.php:92
44
  msgid "of"
45
  msgstr ""
46
 
47
+ #: server-ip-memory-usage.php:92
 
 
 
 
48
  msgid "WP LIMIT"
49
  msgstr ""
50
 
51
+ #: server-ip-memory-usage.php:112
52
  msgid "Could not activate plugin: PHP version error"
53
  msgstr ""
54
 
55
+ #: server-ip-memory-usage.php:112
56
  msgid "You are using PHP version"
57
  msgstr ""
58
 
59
+ #: server-ip-memory-usage.php:112
60
  msgid "This plugin has been tested with PHP versions 5.3 and greater."
61
  msgstr ""
62
 
63
+ #: server-ip-memory-usage.php:112
64
  msgid ""
65
  "WordPress itself <a href=\"https://wordpress.org/about/requirements/\" "
66
  "target=\"_blank\">recommends using PHP version 7 or greater</a>. Please "
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.7
8
- Stable tag: 2.0.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -61,6 +61,8 @@ You can access the description of the plugin in Spanish at: [Server IP & Memory
61
 
62
  Please note that the plugin should not be used together with other plugins with similar funcionalities like: [WP-Memory-Usage](http://wordpress.org/plugins/wp-memory-usage/ "WP-Memory-Usage").
63
 
 
 
64
  == Frequently Asked Questions ==
65
 
66
  = Why did you make this plugin? =
@@ -75,6 +77,7 @@ You can simply activate, deactivate or delete it in your plugin management secti
75
 
76
  = Are there any known incompatibilities? =
77
  The plugin should not be used together with other plugins with similar funcionalities like: [WP-Memory-Usage](http://wordpress.org/plugins/wp-memory-usage/ "WP-Memory-Usage").
 
78
 
79
  = Are there any server requirements? =
80
  The PHP version should be at least 5.3. If PHP version is lower than 5.3 there is an error message shown and plugin is not activated.
@@ -84,6 +87,9 @@ Of course we do. That's why we created it. ;-)
84
 
85
  == Changelog ==
86
 
 
 
 
87
  = 2.0.0 =
88
  * Added additional information about memory_get_peak_usage() - support ticket by @diablodale
89
 
@@ -117,8 +123,8 @@ Of course we do. That's why we created it. ;-)
117
 
118
  == Upgrade Notice ==
119
 
120
- = 2.0.0 =
121
- * Added additional information about memory_get_peak_usage()
122
 
123
  == Contact ==
124
 
5
  Tags: memory, memory-limit, ip, ips, admin, adress, php, server, info
6
  Requires at least: 3.0.1
7
  Tested up to: 4.7
8
+ Stable tag: 2.0.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
61
 
62
  Please note that the plugin should not be used together with other plugins with similar funcionalities like: [WP-Memory-Usage](http://wordpress.org/plugins/wp-memory-usage/ "WP-Memory-Usage").
63
 
64
+ Please use with *WordPress MultiSite* at your own risk, as it has not been tested.
65
+
66
  == Frequently Asked Questions ==
67
 
68
  = Why did you make this plugin? =
77
 
78
  = Are there any known incompatibilities? =
79
  The plugin should not be used together with other plugins with similar funcionalities like: [WP-Memory-Usage](http://wordpress.org/plugins/wp-memory-usage/ "WP-Memory-Usage").
80
+ Please use with *WordPress MultiSite* at your own risk, as it has not been tested.
81
 
82
  = Are there any server requirements? =
83
  The PHP version should be at least 5.3. If PHP version is lower than 5.3 there is an error message shown and plugin is not activated.
87
 
88
  == Changelog ==
89
 
90
+ = 2.0.1 =
91
+ * Changed memory information display to use memory_get_peak_usage().
92
+
93
  = 2.0.0 =
94
  * Added additional information about memory_get_peak_usage() - support ticket by @diablodale
95
 
123
 
124
  == Upgrade Notice ==
125
 
126
+ = 2.0.1 =
127
+ * Changed memory information display to use memory_get_peak_usage().
128
 
129
  == Contact ==
130
 
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: 2.0.0
7
  Author: Apasionados, Apasionados del Marketing
8
  Author URI: http://apasionados.es
9
  Text Domain: server-ip-memory-usage
@@ -47,9 +47,9 @@ if ( is_admin() ) {
47
  }
48
 
49
  function check_memory_usage() {
50
- // $this->memory['usage'] = function_exists('memory_get_usage') ? round(memory_get_usage(TRUE) / 1024 / 1024, 2) : 0;
51
- // Changed memory_get_usage to memory_get_peak_usage
52
- $this->memory['usage'] = function_exists('memory_get_peak_usage') ? round(memory_get_peak_usage(TRUE) / 1024 / 1024, 2) : 0;
53
  if ( !empty($this->memory['usage']) && !empty($this->memory['limit']) ) {
54
  $this->memory['percent'] = round ($this->memory['usage'] / $this->memory['limit'] * 100, 0);
55
  $this->memory['color'] = 'font-weight:normal;';
@@ -58,19 +58,11 @@ if ( is_admin() ) {
58
  }
59
  }
60
 
61
- function check_memory_peakusage() {
62
- $this->memory['peakusage'] = function_exists('memory_get_peak_usage') ? round(memory_get_peak_usage(TRUE) / 1024 / 1024, 2) : 0;
63
- if ( !empty($this->memory['peakusage']) && !empty($this->memory['limit']) ) {
64
- $this->memory['peakpercent'] = round ($this->memory['peakusage'] / $this->memory['limit'] * 100, 0);
65
- $this->memory['peakcolor'] = 'font-weight:normal;';
66
- if ($this->memory['peakpercent'] > 75) $this->memory['peakcolor'] = 'font-weight:bold;color:#E66F00';
67
- if ($this->memory['peakpercent'] > 90) $this->memory['peakcolor'] = 'font-weight:bold;color:red';
68
- }
69
- }
70
-
71
  function format_wp_limit( $size ) {
72
  $value = substr( $size, -1 );
73
  $return = substr( $size, 0, -1 );
 
 
74
 
75
  switch ( strtoupper( $value ) ) {
76
  case 'P' :
@@ -94,13 +86,12 @@ if ( is_admin() ) {
94
 
95
  function add_footer($content) {
96
  $this->check_memory_usage();
97
- $this->check_memory_peakusage();
98
  //$server_ip_address = $_SERVER[ 'SERVER_ADDR' ];
99
  $server_ip_address = (!empty($_SERVER[ 'SERVER_ADDR' ]) ? $_SERVER[ 'SERVER_ADDR' ] : "");
100
  if ($server_ip_address == "") { // Added for IP Address in IIS
101
  $server_ip_address = (!empty($_SERVER[ 'LOCAL_ADDR' ]) ? $_SERVER[ 'LOCAL_ADDR' ] : "");
102
  }
103
- $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>) · ' . __( 'Peak', 'server-ip-memory-usage' ) . ': ' . $this->memory['peakusage'] . ' ' . __( 'of', 'server-ip-memory-usage' ) . ' ' . $this->memory['limit'] . ' MB (<span style="' . $this->memory['peakcolor'] . '">' . $this->memory['peakpercent'] . '%</span>) | ' . __( 'WP LIMIT', 'server-ip-memory-usage' ) . ': ' . $this->check_wp_limit() . ' | IP ' . $server_ip_address . ' (' . gethostname() . ') | PHP ' . PHP_VERSION . ' @' . (PHP_INT_SIZE * 8) . 'BitOS';
104
  return $content;
105
  }
106
 
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: 2.0.1
7
  Author: Apasionados, Apasionados del Marketing
8
  Author URI: http://apasionados.es
9
  Text Domain: server-ip-memory-usage
47
  }
48
 
49
  function check_memory_usage() {
50
+
51
+ $this->memory['usage'] = function_exists('memory_get_usage') ? round(memory_get_usage() / 1024 / 1024, 2) : 0;
52
+
53
  if ( !empty($this->memory['usage']) && !empty($this->memory['limit']) ) {
54
  $this->memory['percent'] = round ($this->memory['usage'] / $this->memory['limit'] * 100, 0);
55
  $this->memory['color'] = 'font-weight:normal;';
58
  }
59
  }
60
 
 
 
 
 
 
 
 
 
 
 
61
  function format_wp_limit( $size ) {
62
  $value = substr( $size, -1 );
63
  $return = substr( $size, 0, -1 );
64
+
65
+ $return = (int)$return; // Solved: PHP 7.1 Notice: A non well formed numeric value encountered
66
 
67
  switch ( strtoupper( $value ) ) {
68
  case 'P' :
86
 
87
  function add_footer($content) {
88
  $this->check_memory_usage();
 
89
  //$server_ip_address = $_SERVER[ 'SERVER_ADDR' ];
90
  $server_ip_address = (!empty($_SERVER[ 'SERVER_ADDR' ]) ? $_SERVER[ 'SERVER_ADDR' ] : "");
91
  if ($server_ip_address == "") { // Added for IP Address in IIS
92
  $server_ip_address = (!empty($_SERVER[ 'LOCAL_ADDR' ]) ? $_SERVER[ 'LOCAL_ADDR' ] : "");
93
  }
94
+ $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 . ' (' . gethostname() . ') | PHP ' . PHP_VERSION . ' @' . (PHP_INT_SIZE * 8) . 'BitOS';
95
  return $content;
96
  }
97