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
This plugin's installer ran successfully
Server metrics [RAM: ▲0.19MB] [CPU: ▲4.68ms] Passed 4 tests
A check of server-side resources used by Toggles Shortcode and Widget
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.67 ▲0.20 | 51.83 ▲9.93 |
Dashboard /wp-admin | 3.52 ▲0.22 | 53.55 ▲4.19 |
Posts /wp-admin/edit.php | 3.57 ▲0.21 | 57.24 ▲4.37 |
Add New Post /wp-admin/post-new.php | 6.06 ▲0.17 | 100.23 ▲0.21 |
Media Library /wp-admin/upload.php | 3.40 ▲0.17 | 46.59 ▲10.32 |
otwfcr /wp-admin/admin.php?page=otwfcr | 3.37 | 35.74 |
License Manager /wp-admin/admin.php?page=otw-tgsw-lm | 3.50 | 180.63 |
Settings /wp-admin/admin.php?page=otw-tgsw-settings | 3.39 | 37.08 |
Server storage [IO: ▲1.99MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 127 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_otw_shortcode_widget |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Toggles Shortcode and Widget
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,952 ▲191 | 13.86 ▼0.70 | 10.39 ▲8.72 | 44.01 ▼0.28 |
Dashboard /wp-admin | 2,232 ▲55 | 5.78 ▲0.17 | 95.87 ▲7.41 | 68.99 ▲27.67 |
Posts /wp-admin/edit.php | 2,161 ▲58 | 2.31 ▲0.29 | 40.60 ▼0.94 | 34.85 ▼2.81 |
Add New Post /wp-admin/post-new.php | 6,256 ▲4,730 | 21.37 ▼1.61 | 910.91 ▲226.14 | 49.35 ▼14.15 |
Media Library /wp-admin/upload.php | 1,455 ▲55 | 4.59 ▲0.42 | 106.54 ▼7.23 | 80.10 ▲28.68 |
otwfcr /wp-admin/admin.php?page=otwfcr | 831 | 1.87 | 25.56 | 26.41 |
License Manager /wp-admin/admin.php?page=otw-tgsw-lm | 978 | 1.82 | 28.72 | 27.19 |
Settings /wp-admin/admin.php?page=otw-tgsw-settings | 934 | 2.00 | 28.41 | 39.46 |
Uninstaller [IO: ▲0.14MB] [DB: ▲0.01MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- Zombie WordPress options were found after uninstall: 7 options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
- widget_otw_shortcode_widget
- can_compress_scripts
- db_upgraded
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
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
The following issues need your attention
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/toggles-shortcode-and-widget/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-mailhide.php
- > /wp-content/plugins/toggles-shortcode-and-widget/include/otw_components/otw_factory/views/action_message.php
- 14× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/toggles-shortcode-and-widget/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-captcha.php:18
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/toggles-shortcode-and-widget/include/otw_components/otw_shortcode/widgets/otw_shortcode_widget.class.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/toggles-shortcode-and-widget/include/otw_labels/otw_tgsw_factory_object.labels.php:2
- > PHP Fatal error
Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/toggles-shortcode-and-widget/include/otw_components/otw_shortcode/otw_shortcode.class.php:2
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/toggles-shortcode-and-widget/include/otw_components/otw_factory/views/license_manager.php:3
- > PHP Fatal error
Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/toggles-shortcode-and-widget/include/otw_components/otw_form/otw_form.class.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/toggles-shortcode-and-widget/otw_content_manager.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/toggles-shortcode-and-widget/include/otw_tgsw_process_actions.php:6
- > PHP Notice
Undefined variable: return_url in wp-content/plugins/toggles-shortcode-and-widget/include/otw_components/otw_factory/views/action_message.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'OTW_Shortcodes' not found in wp-content/plugins/toggles-shortcode-and-widget/include/otw_components/otw_shortcode/shortcodes/otw_shortcode_content_toggle.class.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
- Screenshots: These screenshots do not have images: #1 (WYSIWYG page/post editor button), #2 (OTW Shortcode Widget), #3 (Toggles Options), #4 (Front-end)
toggles-shortcode-and-widget/otw_content_manager.php 92% from 13 tests
"Toggles Shortcode and Widget" version 1.14's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("toggles-shortcode-and-widget.php" instead of "otw_content_manager.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
Success! There were no dangerous files found in this plugin17,072 lines of code in 60 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 14 | 472 | 113 | 7,722 |
PHP | 27 | 1,423 | 921 | 4,563 |
SVG | 4 | 0 | 0 | 2,709 |
JavaScript | 14 | 506 | 132 | 2,061 |
JSON | 1 | 0 | 0 | 17 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 75.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 193.00 |
Average method complexity | 5.23 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 35.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 | 159 | |
▷ Static methods | 22 | 13.84% |
▷ Public methods | 120 | 75.47% |
▷ Protected methods | 27 | 16.98% |
▷ Private methods | 12 | 7.55% |
Functions | 47 | |
▷ Named functions | 47 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
35 PNG files occupy 0.18MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
include/otw_components/otw_shortcode/images/blockquote-testimonial.png | 0.16KB | 0.20KB | 0.00% |
screenshot-2.png | 43.84KB | 18.28KB | ▼ 58.30% |
include/otw_components/otw_form/img/colorpicker/colorpicker_hex.png | 0.52KB | 0.42KB | ▼ 19.92% |
include/otw_components/otw_shortcode/images/diag-background-translucent-darker.png | 0.08KB | 0.10KB | 0.00% |
include/otw_components/otw_form/img/colorpicker/colorpicker_hsb_s.png | 1.14KB | 0.80KB | ▼ 29.97% |