';
129 | echo '
' . __("Optimus Bulk Optimizer", "optimus") . '
';
130 | if ((empty($_POST['optimus-bulk-optimizer']) && empty($_GET['ids'])) || $count == 0) {
131 | echo '
' . __("The Optimus bulk optimizer compresses all images that have not yet been compressed in your WordPress media library.", "optimus") . '
';
132 |
133 | if ( Optimus_HQ::is_locked() ) {
134 | echo '
' . __("It is recommended to run the bulk image optimization with an Optimus HQ activated version due to the size limitation of the free version.", "optimus") . '
';
135 | }
136 |
137 | echo '
' . sprintf(__("Optimus found %d images in your WordPress media library that can be optimized.", "optimus"), $count) . '
';
138 | echo '
';
143 | } else {
144 | check_admin_referer('optimus-bulk-optimizer');
145 | echo '
' . __("It might take a while until all images are optimized. This depends on the amount and size of the images.", "optimus") . '
';
146 | echo '
' . __("Note: Do not close this tab during the optimization process.", "optimus") . '
';
147 |
148 | echo '
' . __("Completed", "optimus") . ' 0 / ' . sprintf(' %d
', $count);
149 | echo '
';
150 |
151 | echo '';
152 | }
153 |
154 | echo '
';
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | === Optimus - WordPress Image Optimizer ===
2 | Contributors: keycdn
3 | Tags: image optimizer, wordpress image optimizer, optimize image, images, webp
4 | Tested up to: 6.8
5 | Stable tag: 1.6.3
6 | Requires at least: 4.6
7 | Requires PHP: 5.6
8 | License: GPLv2 or later
9 | License URI: http://www.gnu.org/licenses/gpl-2.0.html
10 |
11 |
12 | Effective image compression and optimization during the upload process. Smart, automatic and reliable.
13 |
14 |
15 | == Description ==
16 |
17 | = WordPress Image Optimizer =
18 | Optimus reduces the file size of uploaded media files automatically. Depending on the image and format, reductions in size of up to 70% are possible. Several kilobytes can be saved per image—these savings contribute positively to the performance of the blog website. What’s most impressive about the compression technology: the quality of the images is maintained.
19 |
20 |
21 | > #### There are three different versions of Optimus:
22 | > 1. **Optimus** *(Free)* as base version with limitations (e.g. max of 100kb)
23 | > 2. **Optimus HQ** *(Premium)* with expanded functionality for personal projects
24 | > 3. **Optimus HQ PRO** *(Premium)* as professional solution for customer websites
25 |
26 | More details about the features and the pricing model on [optimus.io](https://optimus.io)
27 |
28 |
29 | = How does it work? =
30 | During the uploading process of images to the media library, the *Optimus* plugin simultaneously sends the images to the *Optimus* server, where the incoming material is processed and sent back in optimized form. Afterwards, the *Optimus* plugin saves the image version with a reduced file size in the media library.
31 |
32 | The optimization of images - *including thumbnails* - is conducted in the background and outside of the view of the user. The image compression gains per file are displayed by Optimus within the media library in form of a percentage value, see [screenshot](https://wordpress.org/plugins/optimus/screenshots/).
33 |
34 | Superfluous information that is saved by image processing programs and is not even necessary for displaying the image is extracted from image files. This way, the quality of the graphics remains intact while the image size can be reduced significantly. If you wish, Optimus keeps all author, EXIF and copyright information contained within the photos — the compressional gains will be correspondingly lower.
35 |
36 | Optimus supports the conversion of images to the new [*WebP* image format](https://www.keycdn.com/blog/convert-to-webp-the-successor-of-jpeg).
37 |
38 | > It is recommended to use the [WordPress Cache Enabler](https://wordpress.org/plugins/cache-enabler/) plugin to integrate the converted WebP images.
39 |
40 | = Features =
41 | * [Progressive JPEGs](https://www.keycdn.com/support/optimus/progressive-jpeg)
42 | * Reduction of file size during the upload
43 | * Optimization of all preview images of a photo
44 | * No adjustments to code necessary
45 | * Optional: no removal of EXIF and IPTC metadata
46 | * Optional: HTTPS connection for the image transfer (Optimus HQ)
47 | * Optional: [conversion to the WebP](https://www.keycdn.com/support/optimus/configuration-to-deliver-webp) image format (Optimus HQ)
48 | * Faster load times for blog pages
49 | * Support for WooCommerce
50 | * WordPress multisite-support
51 | * [Bulk optimization](https://www.keycdn.com/support/optimus/image-bulk-optimization) (optimize existing images)
52 |
53 |
54 | = Privacy =
55 | * After the image optimization and transfer process, the *Optimus* server immediately deletes all the temporarily stored files. No files are stored!
56 | * The Optimus servers are located in Germany.
57 |
58 |
59 | = Tips =
60 | * Photos should always be saved as JPEGs rather than PNGs. The PNG format works well for illustrations, JPEG on the other hand is the right choice for photographs. Another reason: the size reduction always works more quickly for JPEGs.
61 | * Your images have been optimized using Desktop tools such as ImageOptim (Mac) or PNGGauntlet (Win) before you upload them? Optimus has the significant benefit of also minimizing the thumbnails (=preview images) created by WordPress. After all, themes almost always integrate thumbnails rather than original images.
62 |
63 |
64 | = System Requirements =
65 | * PHP >=5.6
66 | * WordPress >=4.6
67 | * Allow outbound connections
68 |
69 |
70 | = Storage Utilization =
71 | * Backend: ~ 0,19 MB
72 | * Frontend: ~ 0,01 MB
73 |
74 |
75 | = Website =
76 | * [optimus.io](https://optimus.io)
77 |
78 |
79 | = Author =
80 | * [KeyCDN](https://www.keycdn.com "KeyCDN")
81 |
82 |
83 |
84 | == Changelog ==
85 |
86 | = 1.6.3 =
87 | * WordPress 6.1 compatibility
88 |
89 | = 1.6.2 =
90 | * WordPress 6.0 compatibility
91 |
92 | = 1.6.1 =
93 | * Fix bulk image optimization (#13 @tg247)
94 |
95 | = 1.6.0 =
96 | * Skip missing files
97 | * Added wpcli command for bulk optimization
98 | * Added option to append instead of replace file extension for webp files
99 |
100 | = 1.5.0 =
101 | * Unsupported image types are now gracefully skipped
102 | * Renamed setting names and greyed out inapplicable settings to avoid confusion
103 | * Increased size limit for Optimus HQ to 10MB
104 | * Licences can now easily be extended
105 | * Optimize images uploaded through the REST API
106 |
107 | = 1.4.9 =
108 | * Formatting updates
109 |
110 | = 1.4.8 =
111 | * Improved the handling of 204 errors
112 | * Removed language files
113 |
114 | = 1.4.7 =
115 | * Improved the bulk optimizer
116 |
117 | = 1.4.6 =
118 | * Added support for WP Retina 2x
119 |
120 | = 1.4.5 =
121 | * Optimization to avoid conflicts with other plugins or themes
122 |
123 | = 1.4.4 =
124 | * Fixed static function warning in PHP 5.6
125 |
126 | = 1.4.3 =
127 | * Increased timeout value to 180 seconds
128 |
129 | = 1.4.2 =
130 | * Allow to generate WebP images on already optimzed images (bulk optimizer)
131 |
132 | = 1.4.1 =
133 | * Improves bulk optimization error handling
134 |
135 | = 1.4.0 =
136 | * Added PNG in the free version and the manual optimization setting
137 |
138 | = 1.3.9 =
139 | * Bug fixing and activation update
140 |
141 | = 1.3.8 =
142 | * Bulk optimization feature
143 |
144 | = 1.3.7 =
145 | * Erhöhung der Limits für alle Formate
146 | * [Limits auf optimus.io](https://optimus.io)
147 |
148 | = 1.3.6 =
149 | * Neue Option: Keine Optimierung der Originalbilder
150 | * Korrektur: Löschung der WebP-Bilder im AJAX-Modus
151 |
152 | = 1.3.5 =
153 | * Erhöhung des Limits für PNG-Dateien auf 512 KB (Optimus HQ)
154 |
155 | = 1.3.4 =
156 | * Umstellung des Plugins auf die neue Optimus API (cURL only)
157 |
158 | = 1.3.3 =
159 | * Kompatibilität zu WooCommerce
160 | * Einführung von Optimus HQ PRO
161 |
162 | = 1.3.2 =
163 | * Anzeige der in WordPress registrierten Bildgrößen (Thumbnails)
164 |
165 | = 1.3.1 =
166 | * Anpassung für WordPress 3.9: Sicherstellung der Bildoptimierung im WordPress-Editor
167 |
168 | = 1.3.0 =
169 | * Überarbeitung der Kommunikation via cURL
170 | * Implementierung von HTTPS (Optimus HQ)
171 | * Zusätzliche Checks beim Versand und Empfang der Daten
172 | * Vereinfachung der Feedback-Ausgabe in grünen Kreisen
173 | * Kein Abgleich der Davor-Danach-Bildgrößen für 204-Header
174 | * Connection-Timeout auf 10 Sekunden
175 | * Tiefgehende Code-Revision
176 |
177 | = 1.2.0 =
178 | * Optimierungen am Plugin-Rechtemanagement
179 | * Überarbeitung der Plugin-Hinweise
180 |
181 | = 1.1.9 =
182 | * Optimus HQ: Umbau der Lizenzverifizierung wegen einem [Bug](https://www.google.de/search?q=w3+total+cache+transient) im W3 Total Cache Plugin
183 | * Ausbau der Schnittstelle für binäre Datenübertragung
184 |
185 | = 1.1.8 =
186 | * Anzeige des Optimus HQ Ablaufdatums
187 | * Admin-Hinweis bei abgelaufener Optimus HQ Lizenz
188 |
189 | = 1.1.7 =
190 | * Christmas-Edition (Code- & Performance-Optimierungen)
191 |
192 | = 1.1.6 =
193 | * Optimiert für WordPress 3.8
194 |
195 | = 1.1.5 =
196 | * Optimus HQ: Eingabe eines neuen Lizenzschlüssels möglich
197 | * Selbstprüfung auf Erreichbarkeit der Upload-Bilder (Zugriffsschutz, etc.)
198 | * Performance-Optimierungen
199 |
200 | = 1.1.4 =
201 | * Optimus HQ: Erhöhung des Limits für PNGs auf 200 KB
202 | * Optimus HQ: Konvertierung der Bilder ins WebP-Format
203 |
204 | = 1.1.3 =
205 | * Unterstützung für WordPress Apps und Windows Live Writer
206 |
207 | = 1.1.2 =
208 | * Option: Bild-Metadaten nicht entfernen
209 |
210 | = 1.1.1 =
211 | * Interne Umstellung auf Mime-Type
212 | * Code-Optimierungen
213 |
214 | = 1.1.0 =
215 | * Umstellung auf Freemium Modell
216 | * Plugin Website: [optimus.io](https://optimus.io)
217 |
218 | = 1.0.0 =
219 | * Code-Freeze
220 | * Vervollständigung der FAQ
221 | * Filter für lokale Installationen
222 |
223 | = 0.0.9 =
224 | * Support für PNGs
225 |
226 | = 0.0.8 =
227 | * Beschränkung auf JPEGs (da fast keine PNG/GIF-Nutzung)
228 | * Menge der optimierten Thumbnails als Diagramm
229 | * Überarbeitung diverser Code-Fragmente
230 |
231 | = 0.0.7 =
232 | * Verbesserte Fehlerausgabe an den Nutzer
233 |
234 | = 0.0.6 =
235 | * Erweiterung der FAQ
236 | * Unterstützung für WordPress 3.5
237 | * Erhöhung des max. Limits auf 300 KB
238 |
239 | = 0.0.5 =
240 | * Zusatzabfrage für (korrupte) Bild-URLs
241 | * Weiterer [Screenshot](https://wordpress.org/plugins/optimus/screenshots/)
242 |
243 | = 0.0.4 =
244 | * Diverse Code-Optimierungen
245 | * Reduzierung der Max-Größe
246 |
247 | = 0.0.3 =
248 | * Unterstützung für PHP 5.2.4
249 |
250 | = 0.0.2 =
251 | * Überarbeitung der GUI
252 |
253 | = 0.0.1 =
254 | * Init release
255 |
256 |
257 | == Screenshots ==
258 |
259 | 1. Display of the compression rate and how many images have been optimized (circle)
260 | 2. Before and after: Original image incl. thumbnails without compression (above) and below with Optimus compressed/optimized
261 |
--------------------------------------------------------------------------------
/inc/optimus.class.php:
--------------------------------------------------------------------------------
1 | %s',
192 | add_query_arg(
193 | array(
194 | 'page' => 'optimus'
195 | ),
196 | admin_url('options-general.php')
197 | ),
198 | __("Settings")
199 | )
200 | )
201 | );
202 | }
203 |
204 |
205 | /**
206 | * Hinzufügen der Meta-Informationen
207 | *
208 | * @since 0.0.1
209 | * @change 1.1.8
210 | *
211 | * @param array $rows Array mit Links
212 | * @param string $file Name des Plugins
213 | * @return array Array mit erweitertem Link
214 | */
215 |
216 | public static function add_row_meta($rows, $file)
217 | {
218 | /* Restliche Plugins? */
219 | if ( $file !== OPTIMUS_BASE ) {
220 | return $rows;
221 | }
222 |
223 | /* Keine Rechte? */
224 | if ( ! current_user_can('manage_options') ) {
225 | return $rows;
226 | }
227 |
228 | /* Add new key link */
229 | $rows = array_merge(
230 | $rows,
231 | array(
232 | sprintf(
233 | '