10% icon-table-of-contents-and-menus

Code Review | Icon Table of Contents and Menus

WordPress plugin Icon Table of Contents and Menus scored10%from 54 tests.

About plugin

  • Plugin page: icon-table-of-con...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2013
  • Latest release: Nov 7, 2013
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: dmlenton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,282 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Netf_Toc::activate() should not be called statically

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.29ms] Passed 4 tests

Server-side resources used by Icon Table of Contents and Menus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.60 ▼1.14
Dashboard /wp-admin3.33 ▲0.0350.27 ▲0.38
Posts /wp-admin/edit.php3.39 ▲0.0349.33 ▼2.63
Add New Post /wp-admin/post-new.php5.92 ▲0.0399.80 ▼1.77
Media Library /wp-admin/upload.php3.26 ▲0.0337.42 ▲1.83

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Icon Table of Contents and Menus: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲11214.06 ▼0.596.52 ▲4.3344.44 ▼2.24
Dashboard /wp-admin2,206 ▲185.89 ▲0.03107.43 ▲1.4943.51 ▼1.41
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0240.32 ▲3.6134.20 ▼3.76
Add New Post /wp-admin/post-new.php1,533 ▲1923.16 ▲5.73603.69 ▼88.3864.16 ▲7.42
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.03101.88 ▼2.8846.13 ▼6.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Netf_Toc::deactivate() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/icon-table-of-contents-and-menus/templates/toc_nav.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/icon-table-of-contents-and-menus/icon-table-of-contents-and-menus.php:198
    • > PHP Notice
      Undefined variable: netf_toc_output in wp-content/plugins/icon-table-of-contents-and-menus/templates/toc_nav.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: toc, table of contents, menu, tocs, menus

icon-table-of-contents-and-menus/icon-table-of-contents-and-menus.php Passed 13 tests

The entry point to "Icon Table of Contents and Menus" version 1.2 is a PHP file that has certain tags in its header comment area
67 characters long description:
A WordPress plugin for adding an expandable table of contents (toc)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin259 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21742161
CSS1123577
JavaScript11021

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo-navigation.png3.32KB0.11KB▼ 96.74%