Mailster WordPress Newsletter Plugin Compatibility Tester - Version 1.0

Version Description

Download this release

Release Info

Developer everpress
Plugin Icon 128x128 Mailster WordPress Newsletter Plugin Compatibility Tester
Version 1.0
Comparing to
See all releases

Version 1.0

Files changed (2) hide show
  1. mailster.php +123 -0
  2. readme.txt +55 -0
mailster.php ADDED
@@ -0,0 +1,123 @@
1
+ <?php
2
+ /*
3
+ Plugin Name: Mailster Newsletter
4
+ Plugin URI: http://mailster.co
5
+ Description: This is a compatibility test plugin for the Mailster Newsletter plugin
6
+ Version: 1.0
7
+ Author: EverPress
8
+ Author URI: https://everpress.io
9
+ Text Domain: mailster-tester
10
+ License: GPLv2 or later
11
+ */
12
+
13
+ class MailsterTester {
14
+
15
+ private $plugin_path;
16
+ private $plugin_url;
17
+
18
+ public function __construct() {
19
+
20
+ $this->plugin_path = plugin_dir_path( __FILE__ );
21
+ $this->plugin_url = plugin_dir_url( __FILE__ );
22
+
23
+ register_activation_hook( __FILE__, array( &$this, 'activate' ) );
24
+ register_deactivation_hook( __FILE__, array( &$this, 'deactivate' ) );
25
+
26
+ load_plugin_textdomain( 'mailster-tester' );
27
+
28
+ add_action( 'init', array( &$this, 'init' ), 1 );
29
+ }
30
+
31
+
32
+ public function activate( $network_wide ) { }
33
+
34
+
35
+ public function deactivate( $network_wide ) { }
36
+
37
+
38
+ public function init() {
39
+
40
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
41
+
42
+ }
43
+
44
+
45
+
46
+ public function admin_menu() {
47
+ $hook = add_management_page( 'Mailster Tester', 'Mailster Tester', 'install_plugins', 'mailster-tester', array( $this, 'admin_page' ), '' );
48
+ }
49
+
50
+ public function admin_page() {
51
+
52
+ $errors = $this->check_compatibility();
53
+
54
+ if ( $errors->error_count ) {
55
+
56
+ echo '<h3>Following Errors occurred</h3>';
57
+ echo '<div class="error"><p><strong>' . implode( '<br>', $errors->errors->get_error_messages() ) . '</strong></p></div>';
58
+
59
+ } else {
60
+
61
+ echo '<h3>No errors where found!</h3>';
62
+
63
+ }
64
+
65
+ if ( $errors->warning_count ) {
66
+
67
+ echo '<h3>Following Warnings occurred</h3>';
68
+ echo '<div class="error"><p><strong>' . implode( '<br>', $errors->warnings->get_error_messages() ) . '</strong></p></div>';
69
+
70
+ } else {
71
+
72
+ echo '<h3>No warnings where found!</h3>';
73
+
74
+ }
75
+
76
+ echo '<p>Thanks for testing!</p>';
77
+
78
+ }
79
+
80
+ public function check_compatibility( $notices = true, $die = false ) {
81
+
82
+ $errors = (object) array(
83
+ 'error_count' => 0,
84
+ 'warning_count' => 0,
85
+ 'errors' => new WP_Error(),
86
+ 'warnings' => new WP_Error(),
87
+ );
88
+
89
+ $upload_folder = wp_upload_dir();
90
+
91
+ $content_dir = trailingslashit( $upload_folder['basedir'] );
92
+
93
+ if ( version_compare( PHP_VERSION, '5.3' ) < 0 ) {
94
+ $errors->errors->add( 'minphpversion', sprintf( 'Mailster requires PHP version 5.3 or higher. Your current version is %s. Please update or ask your hosting provider to help you updating.', PHP_VERSION ) );
95
+ }
96
+ if ( version_compare( get_bloginfo( 'version' ), '3.8' ) < 0 ) {
97
+ $errors->errors->add( 'minphpversion', sprintf( 'Mailster requires WordPress version 3.8 or higher. Your current version is %s.', get_bloginfo( 'version' ) ) );
98
+ }
99
+ if ( ! class_exists( 'DOMDocument' ) ) {
100
+ $errors->errors->add( 'DOMDocument', 'Mailster requires the <a href="https://php.net/manual/en/class.domdocument.php" target="_blank">DOMDocument</a> library.' );
101
+ }
102
+ if ( ! function_exists( 'fsockopen' ) ) {
103
+ $errors->warnings->add( 'fsockopen', 'Your server does not support <a href="https://php.net/manual/en/function.fsockopen.php" target="_blank">fsockopen</a>.' );
104
+ }
105
+ if ( ! is_dir( $content_dir ) || ! wp_is_writable( $content_dir ) ) {
106
+ $errors->warnings->add( 'writeable', sprintf( 'Your content folder in %s is not writeable.', '"' . $content_dir . '"' ) );
107
+ }
108
+ if ( max( intval( @ini_get( 'memory_limit' ) ), intval( WP_MAX_MEMORY_LIMIT ) ) < 128 ) {
109
+ $errors->warnings->add( 'menorylimit', 'Your Memory Limit is ' . size_format( WP_MEMORY_LIMIT * 1048576 ) . ', Mailster recommends at least 128 MB' );
110
+ }
111
+
112
+ $errors->error_count = count( $errors->errors->errors );
113
+ $errors->warning_count = count( $errors->warnings->errors );
114
+
115
+ return $errors;
116
+
117
+ }
118
+
119
+
120
+ }
121
+
122
+
123
+ new MailsterTester();
readme.txt ADDED
@@ -0,0 +1,55 @@
1
+ === Mailster Email Newsletters ===
2
+ Contributors: everpress, revaxarts
3
+ Tags: mailster tester, newsletter, email, newsletters
4
+ Requires at least: 3.8
5
+ Tested up to: 4.8
6
+ Stable tag: 1.0
7
+ License: GPLv2 or later
8
+ Author: EverPress
9
+ Author URI: https://mailster.co
10
+
11
+ This is a compatibility tester plugin for the Mailster Email Newsletter Plugin available at: [mailster.co](https://mailster.co)
12
+
13
+ == Description ==
14
+
15
+ > This is a compatibility tester plugin for the Mailster Email Newsletter Plugin available at: [mailster.co](https://mailster.co)
16
+
17
+ Mailster makes it easy to create, send and manage your email newsletter campaigns within WordPress.
18
+
19
+ == Features ==
20
+
21
+ * Track Opens, Clicks, Unsubscriptions and Bounces
22
+ * Track Countries and Cities
23
+ * Schedule your Campaigns
24
+ * Six types of auto responders
25
+ * Send your latest post to your subscribers
26
+ * Use dynamic and custom Tags (placeholders)
27
+ * Webversion for each Newsletter
28
+ * Embed Newsletter with Shortcodes
29
+ * Forward via Email
30
+ * Share with Social Media Services
31
+ * Unlimited Subscription Forms
32
+ * Sidebar Widgets
33
+ * Single or Double-Opt-in support
34
+ * WYSIWYG Editor with code view
35
+ * Unlimited Color Variations
36
+ * Optional Image embedding
37
+ * Automatic Inline Styles
38
+ * Background Image support
39
+ * Quick Preview
40
+ * Revisions support (native)
41
+ * Multi language ready
42
+ * SMTP support
43
+ * DomainKeys Identified Mail Support
44
+ * Import and Export for Subscribers
45
+ * Retina Ready
46
+
47
+ == Installation ==
48
+
49
+ 1. Upload the entire `mailster` folder to the `/wp-content/plugins/` directory
50
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
51
+ 3. Go to Tools => Mailster Tester and check for errors and warnings
52
+
53
+ == Changelog ==
54
+
55
+ For further details please visit [the changelog on the Mailster Homepage](https://mailster.co/changelog/)