Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼6.64ms] Passed 4 tests
Analyzing server-side resources used by LWSCache
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 38.52 ▲1.66 |
Dashboard /wp-admin | 3.37 ▲0.03 | 46.70 ▼17.98 |
Posts /wp-admin/edit.php | 3.43 ▲0.07 | 45.33 ▼5.07 |
Add New Post /wp-admin/post-new.php | 5.96 ▲0.07 | 80.08 ▼5.16 |
Media Library /wp-admin/upload.php | 3.30 ▲0.07 | 34.82 ▲1.71 |
Server storage [IO: ▲0.74MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for LWSCache
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,954 ▲207 | 14.37 ▲0.02 | 1.75 ▲0.05 | 39.09 ▼4.29 |
Dashboard /wp-admin | 2,333 ▲159 | 5.56 ▼0.04 | 89.00 ▲0.48 | 77.76 ▲31.94 |
Posts /wp-admin/edit.php | 2,247 ▲147 | 1.99 ▼0.01 | 34.03 ▼6.99 | 32.19 ▼4.97 |
Add New Post /wp-admin/post-new.php | 1,827 ▲301 | 21.97 ▼1.09 | 710.87 ▲39.59 | 51.88 ▲2.71 |
Media Library /wp-admin/upload.php | 1,553 ▲156 | 4.12 ▼0.08 | 99.06 ▼0.34 | 72.33 ▲30.76 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/lwscache/admin/partials/lws-cache-admin-display.php:16
- > PHP Fatal error
Uncaught Error: Class 'Purger' not found in wp-content/plugins/lwscache/admin/class-phpredis-purger.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lwscache/admin/partials/lws-cache-our-plugins.php:2
- > PHP Fatal error
Uncaught Error: Class 'Purger' not found in wp-content/plugins/lwscache/admin/class-varnish-purger.php:15
- > PHP Fatal error
Uncaught Error: Call to a member function lws_cache_settings() on null in wp-content/plugins/lwscache/admin/partials/lws-cache-general-options.php:124
- > PHP Fatal error
Uncaught Error: Class 'Purger' not found in wp-content/plugins/lwscache/admin/class-predis-purger.php:15
- > PHP Fatal error
Uncaught Error: Class 'Purger' not found in wp-content/plugins/lwscache/admin/class-fastcgi-purger.php:19
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: lws, cache, nginx
lwscache/lwscache.php Passed 13 tests
"LWSCache" version 2.7.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
63 characters long description:
Cleans nginx's proxy cache whenever a post is edited/published.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin12,950 lines of code in 56 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 20 | 2,688 | 6,949 | 10,613 |
CSS | 3 | 118 | 91 | 859 |
SVG | 29 | 3 | 26 | 701 |
PO File | 2 | 322 | 357 | 693 |
JavaScript | 1 | 21 | 46 | 50 |
JSON | 1 | 0 | 0 | 34 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 4.53 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 135.00 |
Average method complexity | 2.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 31.00 |
Code structure | ||
---|---|---|
Namespaces | 22 | |
Interfaces | 25 | |
Traits | 0 | |
Classes | 244 | |
▷ Abstract classes | 11 | 4.51% |
▷ Concrete classes | 233 | 95.49% |
▷ Final classes | 1 | 0.43% |
Methods | 940 | |
▷ Static methods | 25 | 2.66% |
▷ Public methods | 724 | 77.02% |
▷ Protected methods | 170 | 18.09% |
▷ Private methods | 46 | 4.89% |
Functions | 26 | |
▷ Named functions | 18 | 69.23% |
▷ Anonymous functions | 8 | 30.77% |
Constants | 29 | |
▷ Global constants | 9 | 31.03% |
▷ Class constants | 20 | 68.97% |
▷ Public constants | 20 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/icons/logo_lws.png | 7.05KB | 3.16KB | ▼ 55.23% |
admin/icons/nginx-icon-32x32.png | 3.85KB | 1.26KB | ▼ 67.29% |