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
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.30MB] [CPU: ▼4.86ms] Passed 4 tests
Server-side resources used by Table of Contents Plus
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.78 ▲0.32 | 43.73 ▲7.21 |
Dashboard /wp-admin | 3.61 ▲0.26 | 49.70 ▼12.61 |
Posts /wp-admin/edit.php | 3.73 ▲0.37 | 51.17 ▲3.95 |
Add New Post /wp-admin/post-new.php | 6.19 ▲0.30 | 89.97 ▼10.14 |
Media Library /wp-admin/upload.php | 3.53 ▲0.30 | 36.82 ▼0.63 |
TOC+ /wp-admin/options-general.php?page=toc | 3.55 | 35.19 |
Server storage [IO: ▲0.76MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_toc-widget |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for Table of Contents Plus
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,880 ▲133 | 13.44 ▼1.29 | 10.33 ▲8.75 | 42.80 ▲1.93 |
Dashboard /wp-admin | 2,199 ▲22 | 5.63 ▲0.00 | 85.50 ▼5.40 | 38.81 ▼1.76 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 1.94 ▼0.06 | 36.64 ▼0.90 | 30.65 ▼1.99 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.35 ▼0.03 | 658.98 ▼27.86 | 53.40 ▼1.20 |
Media Library /wp-admin/upload.php | 1,398 ▼2 | 4.17 ▲0.01 | 99.95 ▼12.32 | 41.26 ▼10.02 |
TOC+ /wp-admin/options-general.php?page=toc | 1,905 | 2.37 | 34.95 | 44.20 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
- The uninstall procedure has failed, leaving 7 options in the database
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_toc-widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
Please fix the following
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/table-of-contents-plus/includes/globals.php:26
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/table-of-contents-plus/includes/globals.php:26
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/table-of-contents-plus/includes/globals.php:26
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/table-of-contents-plus/includes/class-toc-widget.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 86% 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
Attributes that need to be fixed:
- Screenshots: Add images for these screenshots: #1 (An example of the table of contents, positioned at the top, right aligned, and a width of 275px), #2 (An example of the sitemap_pages shortcode), #3 (An example of the sitemap_posts shortcode), #4 (The options panel found in Settings > TOC+), #5 (Some advanced options), #6 (The sitemap tab)
table-of-contents-plus/toc.php 77% from 13 tests
"Table of Contents Plus" version 2311...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "2311...")
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("table-of-contents-plus.php" instead of "toc.php")
- Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected2,234 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 259 | 200 | 1,508 |
Markdown | 2 | 68 | 0 | 292 |
CSS | 3 | 17 | 0 | 206 |
JavaScript | 3 | 23 | 43 | 192 |
XML | 1 | 9 | 9 | 20 |
JSON | 1 | 0 | 0 | 16 |
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.46 |
Average class complexity | 140.00 |
▷ Minimum class complexity | 13.00 |
▷ Maximum class complexity | 267.00 |
Average method complexity | 8.49 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 63.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 38 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 32 | 84.21% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 15.79% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 24 | |
▷ Global constants | 24 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.59MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-3.png | 74.56KB | 31.51KB | ▼ 57.74% |
screenshot-5.png | 134.04KB | 58.02KB | ▼ 56.71% |
screenshot-1.png | 127.56KB | 54.65KB | ▼ 57.16% |
images/blue.png | 9.87KB | 4.49KB | ▼ 54.46% |
images/transparent.png | 21.52KB | 10.78KB | ▼ 49.93% |