89% table-of-contents-generate-easily

Code Review | Table of Contents Generate Easily

WordPress plugin Table of Contents Generate Easily scored89%from 54 tests.

About plugin

  • Plugin page: table-of-contents...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 31, 2019
  • Latest release: Feb 1, 2019
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: sockscap64 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /636 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.27ms] Passed 4 tests

Analyzing server-side resources used by Table of Contents Generate Easily
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.93 ▼4.78
Dashboard /wp-admin3.39 ▲0.0945.41 ▼8.55
Posts /wp-admin/edit.php3.50 ▲0.1547.75 ▲1.25
Add New Post /wp-admin/post-new.php5.97 ▲0.0991.75 ▼0.88
Media Library /wp-admin/upload.php3.31 ▲0.0835.86 ▲1.15
TOC Generator /wp-admin/options-general.php?page=table-of-contents-generate-easily/table-of-content-generate-easily.php3.2833.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
toc_generator_options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Table of Contents Generate Easily
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.75 ▼0.905.38 ▲3.6243.94 ▼0.31
Dashboard /wp-admin2,210 ▲194.87 ▼0.01100.92 ▼4.3636.89 ▼7.14
Posts /wp-admin/edit.php2,096 ▲102.06 ▲0.0439.71 ▲3.7933.86 ▼1.49
Add New Post /wp-admin/post-new.php6,218 ▲4,68518.94 ▼4.39895.49 ▲213.5151.64 ▼5.81
Media Library /wp-admin/upload.php1,392 ▲74.20 ▼0.0496.62 ▼5.5742.40 ▼3.90
TOC Generator /wp-admin/options-general.php?page=table-of-contents-generate-easily/table-of-content-generate-easily.php8942.0727.6727.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • toc_generator_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: table of contents, toc, toc generator

table-of-contents-generate-easily/table-of-content-generate-easily.php 77% from 13 tests

Analyzing the main PHP file in "Table of Contents Generate Easily" version 1.2
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("3.9" instead of "4.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("table-of-contents-generate-easily.php" instead of "table-of-content-generate-easily.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin362 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP261137339
CSS20012
JavaScript10011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity85.00
▷ Minimum class complexity85.00
▷ Maximum class complexity85.00
Average method complexity5.94
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin