Benchmarks
Plugin footprint Passed 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.01MB] [CPU: ▼276.47ms] Passed 4 tests
Analyzing server-side resources used by Simple TOC
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 25.08 ▲8.42 |
Dashboard /wp-admin | 3.07 ▲0.01 | 46.52 ▲4.38 |
Posts /wp-admin/edit.php | 3.12 ▲0.01 | 39.85 ▼4.25 |
Add New Post /wp-admin/post-new.php | 5.43 ▲0.00 | 93.74 ▼1,097.24 |
Media Library /wp-admin/upload.php | 3.01 ▲0.00 | 30.68 ▼8.77 |
Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Simple TOC
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,675 ▲93 | 15.85 ▲0.23 | 8.19 ▼1.02 | 46.32 ▲1.49 |
Dashboard /wp-admin | 2,951 ▲101 | 6.01 ▲0.13 | 134.71 ▼14.32 | 105.30 ▲2.91 |
Posts /wp-admin/edit.php | 2,705 ▼1 | 2.70 ▲0.02 | 60.76 ▼10.66 | 88.92 ▼1.48 |
Add New Post /wp-admin/post-new.php | 1,481 ▼376 | 17.13 ▼2.04 | 333.93 ▼36.79 | 109.55 ▲1.27 |
Media Library /wp-admin/upload.php | 1,774 ▲2 | 5.01 ▲0.03 | 147.81 ▼2.40 | 110.64 ▼2.46 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bainternet-simple-toc/simple-toc.php:35
- > 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 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: toc, wiki like toc, table of contents
bainternet-simple-toc/simple-toc.php 92% from 13 tests
The primary PHP file in "Simple TOC" version 0.9.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bainternet-simple-toc.php" instead of "simple-toc.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected296 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 21 | 29 | 165 |
JavaScript | 1 | 0 | 0 | 128 |
CSS | 1 | 0 | 0 | 3 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.13 |
Average class complexity | 15.00 |
▷ Minimum class complexity | 15.00 |
▷ Maximum class complexity | 15.00 |
Average method complexity | 2.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 1 test
Image compression Passed 1 test
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
toc.png | 137.58KB | 87.32KB | ▼ 36.53% |
assets/images/toc_icon.png | 4.57KB | 2.44KB | ▼ 46.69% |