Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.23MB] [CPU: ▲1.39ms] Passed 4 tests
An overview of server-side resources used by LWS Optimize
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.71 ▲0.25 | 54.27 ▲15.69 |
Dashboard /wp-admin | 3.53 ▲0.22 | 48.44 ▼3.23 |
Posts /wp-admin/edit.php | 3.65 ▲0.29 | 51.40 ▲8.17 |
Add New Post /wp-admin/post-new.php | 6.11 ▲0.22 | 89.10 ▼5.06 |
Media Library /wp-admin/upload.php | 3.45 ▲0.22 | 40.13 ▲5.66 |
Server storage [IO: ▲0.85MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 164 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for LWS Optimize
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,953 ▲192 | 14.24 ▼0.11 | 2.06 ▲0.54 | 44.31 ▲6.61 |
Dashboard /wp-admin | 2,322 ▲142 | 5.58 ▼0.04 | 81.10 ▼6.88 | 73.95 ▲31.38 |
Posts /wp-admin/edit.php | 2,242 ▲142 | 1.98 ▼0.00 | 35.57 ▼4.12 | 32.75 ▼3.34 |
Add New Post /wp-admin/post-new.php | 1,659 ▲133 | 23.51 ▼0.07 | 699.59 ▲19.60 | 54.39 ▼11.65 |
Media Library /wp-admin/upload.php | 1,539 ▲136 | 4.13 ▼0.06 | 92.72 ▼8.11 | 75.69 ▲27.06 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- This plugin cannot be uninstalled
- > Warning in wp-content/plugins/lws-optimize/lws-optimize.php+107
rmdir(wp-content/uploads/lws-optimize): Directory not empty
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 4× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/lws-optimize/classes/min/server-info.php
- > /wp-content/plugins/lws-optimize/classes/min/index.php
- > /wp-content/plugins/lws-optimize/classes/min/builder/ocCheck.php
- > /wp-content/plugins/lws-optimize/classes/min/builder/index.php
- 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-optimize/views/plugins.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/lws-optimize/views/object-cache.php:536
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/lws-optimize/views/tabs.php:5
- > PHP Fatal error
Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/lws-optimize/classes/min/lib/Minify/Controller/Files.php:27
- > PHP Fatal error
Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/lws-optimize/classes/min/lib/Minify/Controller/Groups.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lws-optimize/views/medias.php:105
- > PHP Fatal error
Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/lws-optimize/classes/min/lib/Minify/Controller/Page.php:14
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/lws-optimize/views/medias.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-optimize/views/frontend.php:4
- > PHP Fatal error
The script "class.JavaScriptPacker.php" is required. Please see: http://code.google.com/p/minify/source/browse/trunk/min/lib/Minify/Packer.php in wp-content/plugins/lws-optimize/classes/min/lib/Minify/Packer.php on line 21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: optimisation, lws, cache, admin
lws-optimize/lws-optimize.php Passed 13 tests
The entry point to "LWS Optimize" version 1.9.1 is a PHP file that has certain tags in its header comment area
138 characters long description:
Reach better speed and performances with Optimize! Minification, Combination, Media conversion... Everything you need for a better website
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected11,998 lines of code in 146 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 58 | 1,475 | 3,947 | 8,683 |
SVG | 76 | 5 | 69 | 1,583 |
CSS | 3 | 148 | 95 | 857 |
JavaScript | 6 | 3 | 72 | 315 |
PO File | 1 | 150 | 156 | 312 |
Java | 1 | 74 | 77 | 231 |
JSON | 1 | 0 | 0 | 17 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
The following items need your attention
- Method cyclomatic complexity has to be reduced to less than 100 (currently 155)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 25.48 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 229.00 |
Average method complexity | 5.36 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 155.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 54 | |
▷ Abstract classes | 1 | 1.85% |
▷ Concrete classes | 53 | 98.15% |
▷ Final classes | 0 | 0.00% |
Methods | 304 | |
▷ Static methods | 64 | 21.05% |
▷ Public methods | 191 | 62.83% |
▷ Protected methods | 47 | 15.46% |
▷ Private methods | 66 | 21.71% |
Functions | 70 | |
▷ Named functions | 69 | 98.57% |
▷ Anonymous functions | 1 | 1.43% |
Constants | 125 | |
▷ Global constants | 103 | 82.40% |
▷ Class constants | 22 | 17.60% |
▷ Public constants | 22 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/icon-256x256.png | 36.35KB | 9.15KB | ▼ 74.82% |
images/logo_lws.png | 7.05KB | 3.16KB | ▼ 55.23% |
images/logo.png | 1.66KB | 1.64KB | ▼ 1.18% |