84% gutentoc-advance-table-of-content

Code Review | GutenTOC - Advance Table of Content for Gutenberg

WordPress plugin GutenTOC - Advance Table of Content for Gutenberg scored84%from 54 tests.

About plugin

  • Plugin page: gutentoc-advance-...
  • Plugin version: 2.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Nov 25, 2019
  • Latest release: Sep 12, 2023
  • Number of updates: 41
  • Update frequency: every 33.9 days
  • Top authors: tauhidpro (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /12,651 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.36ms] Passed 4 tests

This is a short check of server-side resources used by GutenTOC - Advance Table of Content for Gutenberg
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.63 ▲0.12
Dashboard /wp-admin3.32 ▲0.0149.24 ▼4.13
Posts /wp-admin/edit.php3.37 ▲0.0146.42 ▼0.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.25 ▼4.01
Media Library /wp-admin/upload.php3.24 ▲0.0136.92 ▼1.20
GutenTOC /wp-admin/options-general.php?page=gutentoc3.2130.13

Server storage [IO: ▲0.74MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for GutenTOC - Advance Table of Content for Gutenberg
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.48 ▲0.371.74 ▲0.0242.55 ▲1.91
Dashboard /wp-admin2,224 ▲185.83 ▼0.07103.75 ▲1.3641.34 ▼0.17
Posts /wp-admin/edit.php2,106 ▲61.99 ▼0.0432.68 ▼6.3636.69 ▲2.79
Add New Post /wp-admin/post-new.php6,215 ▲4,67520.21 ▲1.89918.52 ▲280.4456.28 ▲6.99
Media Library /wp-admin/upload.php1,406 ▲64.26 ▼0.00101.00 ▼5.5844.45 ▼0.85
GutenTOC /wp-admin/options-general.php?page=gutentoc8132.1727.0130.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=gutentoc
    • > Network (severe)
    http://tauhidpro.com/plugins/toc/toc-how.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: table of contents, advance table of contents, toc, anchors

gutentoc-advance-table-of-content/gutentoc.php 85% from 13 tests

Analyzing the main PHP file in "GutenTOC - Advance Table of Content for Gutenberg" version 2.0.8
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gutentoc-advance-table-of-content.php" instead of "gutentoc.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected294 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP23561124
JavaScript32618107
CSS32155
SVG4048

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin