Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲1.14MB] [CPU: ▲1.45ms] Passed 4 tests
This is a short check of server-side resources used by Table of content
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.67 ▲1.20 | 68.73 ▲27.32 |
Dashboard /wp-admin | 4.49 ▲1.14 | 57.80 ▼4.02 |
Posts /wp-admin/edit.php | 4.54 ▲1.18 | 61.05 ▲5.40 |
Add New Post /wp-admin/post-new.php | 7.01 ▲1.12 | 108.59 ▼5.11 |
Media Library /wp-admin/upload.php | 4.35 ▲1.12 | 47.91 ▲9.52 |
Server storage [IO: ▲1.71MB] [DB: ▲0.00MB] 67% from 3 tests
Input-output and database impact of this plugin
It is recommended to fix the following issues
- There were 3 files (3.57KB) illegally modified outside of "wp-content/plugins/content-table/" and "wp-content/uploads/"
- (new file) wp-content/sedlex/inline_styles/1551f0e18643a043e7ee78a41e9f4c2cedac8bad.css
- (new file) wp-content/sedlex/inline_scripts/.empty
- (new file) wp-content/sedlex/inline_styles/346000ebb2724813af78fefc9e86621335cb4848.css
Filesystem: 175 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_theysaidso_widget |
coreSLframework_options |
tableofcontent_options |
db_upgraded |
widget_recent-comments |
plugin_error_on_activation |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Table of content
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲32 | 14.67 ▲0.32 | 1.88 ▼0.06 | 37.92 ▼2.33 |
Dashboard /wp-admin | 2,222 ▲42 | 5.57 ▼0.01 | 90.48 ▲2.70 | 42.84 ▲1.70 |
Posts /wp-admin/edit.php | 2,130 ▲30 | 1.99 ▼0.03 | 41.45 ▲5.26 | 34.92 ▲0.88 |
Add New Post /wp-admin/post-new.php | 1,553 ▲27 | 23.19 ▼0.00 | 691.04 ▼2.73 | 51.70 ▲0.71 |
Media Library /wp-admin/upload.php | 1,421 ▲21 | 4.24 ▲0.05 | 100.30 ▼15.79 | 40.99 ▼7.78 |
About... /wp-admin/sedlex.php | 26 | 0.42 | 0.11 | 15.84 |
Table of content /wp-admin/sedlex.php?page=content-table/content-table.php | 26 | 0.42 | 0.09 | 7.00 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method tableofcontent::uninstall_removedata() should not be called statically
- Zombie WordPress options were found after uninstall: 8 options
- plugin_error_on_activation
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- coreSLframework_options
- widget_recent-comments
- widget_theysaidso_widget
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
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 3× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/content-table/content-table.php
- > /wp-content/plugins/content-table/core.php
- > /wp-content/plugins/content-table/core.class.php
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/content-table/core/templates/my-plugin.php on line 18
- > PHP Warning
require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/content-table/core/templates/my-plugin.php on line 18
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
- > GET request to /wp-admin/sedlex.php
- > Network (severe)
wp-admin/sedlex.php - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/sedlex.php?page=content-table/content-table.php
- > Network (severe)
wp-admin/sedlex.php?page=content-table/content-table.php - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
- Screenshots: These screenshots require images: #1 (The configuration page of the plugin), #2 (An example of a table of content)
content-table/content-table.php Passed 13 tests
The main PHP script in "Table of content" version 1.5.3.1 is automatically included on every request by WordPress
42 characters long description:
Insert a *table of content* in your posts.
Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin17,636 lines of code in 81 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 40 | 4,173 | 0 | 9,196 |
PHP | 19 | 946 | 1,710 | 6,883 |
JavaScript | 7 | 246 | 262 | 975 |
CSS | 11 | 86 | 13 | 467 |
Markdown | 1 | 20 | 0 | 84 |
JSON | 1 | 0 | 0 | 29 |
INI | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
Please tend to the following items
- Please reduce cyclomatic complexity of methods to less than 100 (currently 119)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 50.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 211.00 |
Average method complexity | 7.31 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 119.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 19 | |
▷ Abstract classes | 1 | 5.26% |
▷ Concrete classes | 18 | 94.74% |
▷ Final classes | 0 | 0.00% |
Methods | 149 | |
▷ Static methods | 35 | 23.49% |
▷ Public methods | 146 | 97.99% |
▷ Protected methods | 3 | 2.01% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
36 PNG files occupy 0.47MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
core/img/tab_plug.png | 0.71KB | 0.52KB | ▼ 27.30% |
core/img/info.png | 4.30KB | 1.51KB | ▼ 64.82% |
core/img/warning.png | 4.46KB | 1.51KB | ▼ 66.10% |
img/banner-1544x500.png | 164.18KB | 157.93KB | ▼ 3.80% |
core/img/tab_trad.png | 0.90KB | 1.08KB | 0.00% |