Server IP & Memory Usage Display - Version 1.0.1

Version Description

  • First official release.
Download this release

Release Info

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

Version 1.0.1

lang/server-ip-memory-usage-es_ES.mo ADDED
Binary file
lang/server-ip-memory-usage-es_ES.po ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: ip-address-memory-usage\n"
4
+ "POT-Creation-Date: 2013-10-26 12:30+0100\n"
5
+ "PO-Revision-Date: 2013-10-26 12:36+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.5.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
+ #: ../ip-address-memory-usage.php:51
19
+ msgid "Memory"
20
+ msgstr "Memoria"
21
+
22
+ #: ../ip-address-memory-usage.php:51
23
+ msgid "of"
24
+ msgstr "de"
readme.txt ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Server IP & Memory Usage Display ===
2
+ Contributors: apasionados
3
+ Donate link: http://apasionados.es/
4
+ 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.0.0
8
+ Stable tag: 1.0.1
9
+ License: GPLv2 or later
10
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
+
12
+ 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
+
26
+ 4) You can translate the plugin into your own language. So far English and Spanish translations are included. Just translate the .po file in the /lang/ folder.
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
+
34
+ We had been using the WordPress plugin [WP-Memory-Usage](http://wordpress.org/plugins/wp-memory-usage/ "WP-Memory-Usage") but didn't want the dashboard widget and needed the IP address displayed. We also didn't like that the plugin could not be translated.
35
+
36
+ This is why we decided to create a new plugin that solves these two explained needs: IP address display and ability to translate.
37
+
38
+ = Server IP & Memory Usage Display Plugin in your Language! =
39
+ This first release is avaliable in English and Spanish. In the "lang" folder we have included the necessarry files to translate this plugin.
40
+
41
+ If you would like the plugin in your language and you're good at translating, please drop us a line at [Contact us](http://apasionados.es/contacto/index.php?desde=wordpress-org-ip-address-memory-usage-home).
42
+
43
+ = Further Reading =
44
+ You can access the description of the plugin in Spanish at: [Server IP & Memory Usage Display en espa&ntilde;ol](http://apasionados.es/blog/server-ip-memory-usage-display-wordpress-plugin-1781/).
45
+
46
+ == Screenshots ==
47
+
48
+ 1. Example of the footer displaying the information.
49
+ 2. Example of footer when memory usage is over 75%.
50
+ 3. Example of footer when memory usage is over 90%.
51
+
52
+ == Installation ==
53
+
54
+ 1. First you will have to upload the plugin to the `/wp-content/plugins/` folder.
55
+ 2. Then activate the plugin in the plugin panel.
56
+ 3. Now the information regarding memory limit, current memory usage, IP address and PHP version is displayed in the admin footer.
57
+
58
+ 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").
59
+
60
+ == Frequently Asked Questions ==
61
+
62
+ = Why did you make this plugin? =
63
+
64
+ We couldn't find a plugin that would give us the functionality we were looking for:
65
+ 1) IP address display in footer of WordPress admin.
66
+ 2) Total memory and memory usage displayed in the admin footer, without dashboard plugins.
67
+ 3) Easy translation of the plugin into other languages. So far English and Spanish translations are included.
68
+
69
+ = How can I remove Server IP & Memory Usage Display? =
70
+ You can simply activate, deactivate or delete it in your plugin management section.
71
+
72
+ = Are there any known incompatibilities? =
73
+ 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").
74
+
75
+ = Are there any server requirements? =
76
+ The PHP version should be at least 5.3, but in most cases it will work also with lower versions.
77
+
78
+ = Do you make use of Server IP & Memory Usage Display yourself? =
79
+ Of course we do. That's why we created it. ;-)
80
+
81
+ == Changelog ==
82
+
83
+ = 1.0.1 =
84
+ * First official release.
85
+
86
+ = 1.0 =
87
+ * First stable release.
88
+
89
+ = 0.5 =
90
+ * Beta release.
91
+
92
+ == Upgrade Notice ==
93
+
94
+ = 1.0.1 =
95
+ First official release.
96
+
97
+ == Contact ==
98
+
99
+ For further information please send us an [email](http://apasionados.es/contacto/index.php?desde=wordpress-org-ipaddressmemoryusage-contact).
server-ip-memory-usage.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
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.0.1
7
+ Author: Apasionados, Apasionados del Marketing, Nunsys
8
+ Author URI: http://apasionados.es
9
+
10
+ This program is free software; you can redistribute it and/or modify
11
+ it under the terms of the GNU General Public License as published by
12
+ the Free Software Foundation; either version 2 of the License, or
13
+ (at your option) any later version.
14
+
15
+ This program is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU General Public License for more details.
19
+
20
+ You should have received a copy of the GNU General Public License
21
+ along with this program; if not, write to the Free Software
22
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
+ */
24
+
25
+
26
+
27
+ if ( is_admin() ) {
28
+
29
+ class ip_address_memory_usage {
30
+
31
+ var $memory = false;
32
+ var $server_ip_address = false;
33
+
34
+
35
+
36
+ function ip_address_memory_usage() {
37
+ return $this->__construct();
38
+ }
39
+
40
+ function __construct() {
41
+ add_action( 'admin_init', 'ipmem_load_language' );
42
+ function ipmem_load_language() {
43
+ load_plugin_textdomain( 'server-ip-memory-usage', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
44
+ }
45
+ add_action( 'init', array (&$this, 'check_limit') );
46
+ add_filter( 'admin_footer_text', array (&$this, 'add_footer') );
47
+
48
+ $this->memory = array();
49
+ }
50
+
51
+ function check_limit() {
52
+ $this->memory['limit'] = (int) ini_get('memory_limit') ;
53
+ }
54
+
55
+ function check_memory_usage() {
56
+
57
+ $this->memory['usage'] = function_exists('memory_get_usage') ? round(memory_get_usage() / 1024 / 1024, 2) : 0;
58
+
59
+ if ( !empty($this->memory['usage']) && !empty($this->memory['limit']) ) {
60
+ $this->memory['percent'] = round ($this->memory['usage'] / $this->memory['limit'] * 100, 0);
61
+ $this->memory['color'] = 'font-weight:normal;';
62
+ if ($this->memory['percent'] > 75) $this->memory['color'] = 'font-weight:bold;color:#E66F00';
63
+ if ($this->memory['percent'] > 90) $this->memory['color'] = 'font-weight:bold;color:red';
64
+ }
65
+ }
66
+
67
+ function add_footer($content) {
68
+ $this->check_memory_usage();
69
+ $server_ip_address = $_SERVER[ 'SERVER_ADDR' ];
70
+ $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';
71
+ return $content;
72
+ }
73
+
74
+ }
75
+
76
+ add_action( 'plugins_loaded', create_function('', '$memory = new ip_address_memory_usage();') );
77
+ }