Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.81MB] [CPU: ▲0.99ms] 75% from 4 tests
This is a short check of server-side resources used by CM Table Of Contents
Please fix the following
- CPU: Total CPU usage must kept under 500.00ms (currently 909.87ms on /wp-admin/admin.php?page=cmtoc_settings)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.30 ▲0.84 | 47.48 ▲3.10 |
Dashboard /wp-admin | 4.14 ▲0.83 | 60.63 ▲4.31 |
Posts /wp-admin/edit.php | 4.19 ▲0.83 | 53.19 ▲0.82 |
Add New Post /wp-admin/post-new.php | 6.68 ▲0.79 | 97.25 ▼1.97 |
Media Library /wp-admin/upload.php | 3.99 ▲0.77 | 42.53 ▲2.01 |
Settings /wp-admin/admin.php?page=cmtoc_settings | 4.23 | 909.87 |
User Guide /wp-admin/admin.php?page=cmtoc_about | 4.17 | 451.09 |
Upgrade ➤ /wp-admin/admin.php?page=cmtoc_pro | 4.01 | 45.02 |
Server storage [IO: ▲1.03MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 90 new files
Database: no new tables, 25 new options
New WordPress options |
---|
cmtoc_table_of_contentsLevel0Tag |
db_upgraded |
cmtoc_table_of_contentsLevel2Tag |
cmtoc_table_of_contentsOnlySingle |
widget_theysaidso_widget |
cmtoc_table_of_contentsLevel3Tag |
cmtoc_table_of_contentsLevel1Size |
cmtoc_table_of_contentsLevel4Size |
cmtoc_table_of_contentsLevel3Size |
cmtoc_table_of_contentsOnPosttypes |
... |
Browser metrics Passed 4 tests
Checking browser requirements for CM Table Of Contents
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,835 ▲89 | 13.21 ▼1.09 | 2.12 ▲0.16 | 45.35 ▼0.92 |
Dashboard /wp-admin | 2,221 ▲33 | 5.86 ▲0.99 | 111.53 ▼7.21 | 89.26 ▲43.82 |
Posts /wp-admin/edit.php | 2,128 ▲42 | 2.04 ▼0.01 | 38.01 ▲1.92 | 40.15 ▲3.38 |
Add New Post /wp-admin/post-new.php | 6,414 ▲4,900 | 27.27 ▲9.67 | 963.57 ▲271.91 | 56.37 ▲0.51 |
Media Library /wp-admin/upload.php | 1,412 ▲24 | 4.24 ▼0.01 | 103.01 ▼8.48 | 77.29 ▲31.12 |
Settings /wp-admin/admin.php?page=cmtoc_settings | 2,842 | 8.64 | 87.06 | 101.59 |
User Guide /wp-admin/admin.php?page=cmtoc_about | 3,881 | 14.85 | 374.34 | 208.10 |
Upgrade ➤ /wp-admin/admin.php?page=cmtoc_pro | 1,877 | 2.05 | 39.16 | 60.93 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 25 options
- cmtoc_table_of_contentsOnMainQuery
- cmtoc_table_of_contentsLevel0Size
- cmtoc_table_of_contentsLevel0Tag
- cmtoc_table_of_contentsLevel2Tag
- cmtoc_table_of_contentsLevel1Tag
- cmtoc_table_of_contentsLevel5Tag
- cmtoc_table_of_contentsLevel3Tag
- widget_recent-posts
- db_upgraded
- cmtoc_table_of_contentsLevel3Size
- ...
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 3× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/cm-table-of-content/views/backend/admin_nav.php
- > /wp-content/plugins/cm-table-of-content/views/backend/admin_pro.php
- > /wp-content/plugins/cm-table-of-content/views/backend/admin_about.php
- 27× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Walker' not found in wp-content/plugins/cm-table-of-content/functions.php:469
- > PHP Warning
Use of undefined constant CMTOC_NAME - assumed 'CMTOC_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-table-of-content/views/backend/admin_pro.php on line 44
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cm-table-of-content/package/cminds-plugin-config.php:4
- > PHP Warning
Use of undefined constant CMTOC_NAME - assumed 'CMTOC_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-table-of-content/views/backend/admin_about.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/cm-table-of-content/views/backend/admin_settings.php:8
- > PHP Warning
Use of undefined constant CMTOC_RELEASE_NOTES - assumed 'CMTOC_RELEASE_NOTES' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-table-of-content/views/backend/admin_about.php on line 6
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/cm-table-of-content/package/views/userguide_free.php:8
- > PHP Warning
Use of undefined constant CMTOC_RELEASE_NOTES - assumed 'CMTOC_RELEASE_NOTES' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-table-of-content/views/backend/admin_pro.php on line 11
- > PHP Warning
Use of undefined constant CMTOC_NAME - assumed 'CMTOC_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-table-of-content/views/backend/admin_pro.php on line 11
- > PHP Fatal error
Uncaught Error: Class 'CMTOC_Pro' not found in wp-content/plugins/cm-table-of-content/views/backend/admin_template.php:6
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
- > GET request to /wp-admin/admin.php?page=cmtoc_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
- > GET request to /wp-admin/admin.php?page=cmtoc_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
- > GET request to /wp-admin/admin.php?page=cmtoc_about
- > Deprecation (warning) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yq/r/EkaQjAsGGEY.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
- > GET request to /wp-admin/admin.php?page=cmtoc_about
- > Console-api (severe) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yq/r/EkaQjAsGGEY.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: toc, contents, navigation, indexes, table of contents
cm-table-of-content/cm-table-of-content.php Passed 13 tests
The principal PHP file in "CM Table Of Contents" v. 1.1.8 is loaded by WordPress automatically on each request
76 characters long description:
Adds the "table of contents" to the pages based on the h1-h6 or custom tags.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin7,738 lines of code in 28 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 17 | 989 | 708 | 6,110 |
CSS | 6 | 141 | 47 | 1,468 |
JavaScript | 5 | 24 | 13 | 160 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 81.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 254.00 |
Average method complexity | 4.01 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 134 | |
▷ Static methods | 59 | 44.03% |
▷ Public methods | 124 | 92.54% |
▷ Protected methods | 10 | 7.46% |
▷ Private methods | 0 | 0.00% |
Functions | 10 | |
▷ Named functions | 10 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 24 | |
▷ Global constants | 16 | 66.67% |
▷ Class constants | 8 | 33.33% |
▷ Public constants | 8 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
55 PNG files occupy 0.57MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
package/css/images/ui-bg_flat_75_ffffff_40x100.png | 0.20KB | 0.08KB | ▼ 58.17% |
package/views/Hound2.png | 13.25KB | 13.59KB | 0.00% |
package/views/no.png | 0.38KB | 0.44KB | 0.00% |
assets/css/images/ui-bg_glass_75_dadada_1x400.png | 0.26KB | 0.16KB | ▼ 38.93% |
package/views/img/v1.png | 0.24KB | 0.23KB | ▼ 2.49% |