Benchmarks
Plugin footprint 22% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/shrinktheweb-website-preview-plugin/wplib/utils_formbuilder.inc.php+74
Methods with the same name as their class will not be constructors in a future version of PHP; FormBuilder has a deprecated constructor
Server metrics [RAM: ▼1.49MB] [CPU: ▼55.70ms] Passed 4 tests
This is a short check of server-side resources used by ShrinkTheWeb (STW) Website Previews Plugin
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.51 ▼0.96 | 6.82 ▼32.91 |
Dashboard /wp-admin | 2.53 ▼0.82 | 8.47 ▼45.89 |
Posts /wp-admin/edit.php | 2.53 ▼0.83 | 7.96 ▼39.18 |
Add New Post /wp-admin/post-new.php | 2.53 ▼3.36 | 7.18 ▼104.82 |
Media Library /wp-admin/upload.php | 2.53 ▼0.70 | 9.00 ▼25.02 |
How to use /wp-admin/admin.php?page=stwwt_documentation | 2.53 | 6.82 |
Shrink The Web /wp-admin/admin.php?page=stwwt_menu_main | 2.53 | 8.43 |
Thumbnail Cache /wp-admin/admin.php?page=stwwt_thumb_cache | 2.53 | 7.28 |
Error Logs /wp-admin/admin.php?page=stwwt_error_logs | 2.53 | 8.49 |
Server storage [IO: ▲0.33MB] [DB: ▲0.00MB] 67% from 3 tests
Input-output and database impact of this plugin
These are issues you should consider
- The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/shrinktheweb-website-preview-plugin/" and "wp-content/uploads/"
- (new file) wp-content/stw-thumbnails/.empty
Filesystem: 22 new files
Database: 1 new table, 10 new options
New tables |
---|
wp_stw_error_log |
New WordPress options |
---|
widget_recent-posts |
stwwt_dismiss_notice_time |
can_compress_scripts |
db_upgraded |
stwwt_main_settings_version |
stwwt_dismiss_notice |
stwwt_main_settings |
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for ShrinkTheWeb (STW) Website Previews Plugin
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,827 ▲81 | 14.20 ▼0.35 | 1.74 ▲0.12 | 46.10 ▲2.42 |
Dashboard /wp-admin | 2,230 ▲59 | 5.49 ▼0.04 | 88.08 ▼1.12 | 40.03 ▲3.63 |
Posts /wp-admin/edit.php | 2,138 ▲35 | 1.99 ▼0.02 | 36.38 ▼5.10 | 35.49 ▼1.85 |
Add New Post /wp-admin/post-new.php | 1,557 ▲20 | 23.41 ▲5.35 | 673.71 ▲81.19 | 53.62 ▼11.21 |
Media Library /wp-admin/upload.php | 1,438 ▲35 | 4.17 ▼0.02 | 95.36 ▲0.74 | 40.71 ▼2.58 |
How to use /wp-admin/admin.php?page=stwwt_documentation | 960 | 1.99 | 21.71 | 45.24 |
Shrink The Web /wp-admin/admin.php?page=stwwt_menu_main | 2,020 | 1.73 | 24.39 | 44.89 |
Thumbnail Cache /wp-admin/admin.php?page=stwwt_thumb_cache | 843 | 2.03 | 24.13 | 30.90 |
Error Logs /wp-admin/admin.php?page=stwwt_error_logs | 821 | 2.16 | 24.38 | 25.03 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/shrinktheweb-website-preview-plugin/wplib/utils_formbuilder.inc.php+74
Methods with the same name as their class will not be constructors in a future version of PHP; FormBuilder has a deprecated constructor
- Zombie tables were found after uninstall: 1 table
- wp_stw_error_log
- Zombie WordPress options detected upon uninstall: 10 options
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- stwwt_main_settings
- stwwt_dismiss_notice_time
- can_compress_scripts
- db_upgraded
- widget_recent-posts
- stwwt_main_settings_version
- stwwt_dismiss_notice
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=stwwt_error_logs
- > Deprecated in wp-content/plugins/shrinktheweb-website-preview-plugin/wplib/utils_formbuilder.inc.php+74
Methods with the same name as their class will not be constructors in a future version of PHP; FormBuilder has a deprecated constructor
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=stwwt_error_logs
- > Deprecated in wp-content/plugins/shrinktheweb-website-preview-plugin/wplib/utils_formbuilder.inc.php+743
Methods with the same name as their class will not be constructors in a future version of PHP; FormElement has a deprecated constructor
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=stwwt_error_logs
- > Deprecated in wp-content/plugins/shrinktheweb-website-preview-plugin/wplib/utils_pagebuilder.inc.php+23
Methods with the same name as their class will not be constructors in a future version of PHP; PageBuilder has a deprecated constructor
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=stwwt_error_logs
- > Deprecated in wp-content/plugins/shrinktheweb-website-preview-plugin/wplib/utils_tablebuilder.inc.php+24
Methods with the same name as their class will not be constructors in a future version of PHP; TableBuilder has a deprecated constructor
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=stwwt_error_logs
- > Deprecated in wp-content/plugins/shrinktheweb-website-preview-plugin/wplib/utils_tablebuilder.inc.php+156
Methods with the same name as their class will not be constructors in a future version of PHP; RowData has a deprecated constructor
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=stwwt_error_logs
- > Deprecated in wp-content/plugins/shrinktheweb-website-preview-plugin/wplib/utils_tablebuilder.inc.php+199
Methods with the same name as their class will not be constructors in a future version of PHP; TableColumn has a deprecated constructor
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/shrinktheweb-website-preview-plugin/lib/admin_only.inc.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/shrinktheweb-website-preview-plugin/stw-wp-thumbnails.php:34
- > PHP Fatal error
Uncaught Error: Class 'SettingsForm' not found in wp-content/plugins/shrinktheweb-website-preview-plugin/lib/stw_settings_class.inc.php:9
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
- > GET request to /wp-admin/admin.php?page=stwwt_menu_main
- > Network (severe)
https://shrinktheweb.com/uploads/stw-banners/shrinktheweb-234x60.gif - Failed to load resource: the server responded with a status of 404 ()
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: thumbnails, preview, screenshot, website screenshots, snapshot
shrinktheweb-website-preview-plugin/stw-wp-thumbnails.php 92% from 13 tests
The main PHP file in "ShrinkTheWeb (STW) Website Previews Plugin" ver. 2.8.5 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("shrinktheweb-website-preview-plugin.php" instead of "stw-wp-thumbnails.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin4,085 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 922 | 1,585 | 2,951 |
PO File | 1 | 190 | 219 | 687 |
CSS | 1 | 42 | 8 | 228 |
JavaScript | 1 | 18 | 3 | 219 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 33.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 135.00 |
Average method complexity | 4.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 47.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 92 | |
▷ Static methods | 2 | 2.17% |
▷ Public methods | 77 | 83.70% |
▷ Protected methods | 11 | 11.96% |
▷ Private methods | 4 | 4.35% |
Functions | 51 | |
▷ Named functions | 51 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 11 | |
▷ Global constants | 11 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/icon_tick.png | 0.52KB | 0.52KB | 0.00% |
img/icon_padlock.png | 1.44KB | 1.36KB | ▼ 5.36% |
img/stw_bubble_example.png | 8.96KB | 7.91KB | ▼ 11.66% |
img/wpthumb-tinymce-button-icon.png | 2.52KB | 1.68KB | ▼ 33.20% |
img/icon_cross.png | 0.75KB | 0.65KB | ▼ 12.83% |