84% sdz-table-of-contents

Code Review | SDZ - Table of Contents

WordPress plugin SDZ - Table of Contents scored 84% from 54 tests.

About plugin

  • Plugin page: sdz-table-of-cont...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 4, 2023
  • Latest release: Jan 12, 2023
  • Number of updates: 8
  • Update frequency: every 1.0 days
  • Top authors: sdzwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 479 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.28MB] [CPU: ▼12.06ms] Passed 4 tests

Server-side resources used by SDZ - Table of Contents
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.41 ▼5.01
Dashboard /wp-admin3.35 ▲0.0553.35 ▲5.79
Posts /wp-admin/edit.php3.40 ▲0.0547.60 ▲2.25
Add New Post /wp-admin/post-new.php4.64 ▼1.2444.26 ▼47.75
Media Library /wp-admin/upload.php3.28 ▲0.0535.74 ▲2.28

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SDZ - Table of Contents
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5114.47 ▼0.282.16 ▼0.5842.97 ▼7.03
Dashboard /wp-admin2,208 ▲235.83 ▼0.0296.47 ▼7.2940.18 ▼1.85
Posts /wp-admin/edit.php2,091 ▲22.00 ▲0.0138.50 ▲2.9135.02 ▲0.52
Add New Post /wp-admin/post-new.php1,530 ▼423.27 ▲0.14724.57 ▲80.4065.91 ▲13.52
Media Library /wp-admin/upload.php1,393 ▲54.28 ▲0.1297.18 ▼1.8143.93 ▲0.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sdz-table-of-contents/sdz-table-contain.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
8 plugin tags: links, toc, sidebar, table of contents, content...

sdz-table-of-contents/sdz-table-contain.php 92% from 13 tests

The main file in "SDZ - Table of Contents" v. 1.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sdz-table-of-contents.php" instead of "sdz-table-contain.php")

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
Success! There were no dangerous files found in this plugin256 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34426212
CSS11025
JavaScript11019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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 functions9100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imgs/banner-1544x500.png13.42KB8.41KB▼ 37.35%
imgs/icon-256x256.png7.28KB4.00KB▼ 45.14%