90% sc-tableofcontents

Code Review | SC-TableOfContents

WordPress plugin SC-TableOfContents scored90%from 54 tests.

About plugin

  • Plugin page: sc-tableofcontents
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Dec 15, 2022
  • Latest release: Dec 15, 2022
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: seosys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /223 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by SC-TableOfContents
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.60 ▲0.09
Dashboard /wp-admin3.32 ▼0.0251.33 ▼11.80
Posts /wp-admin/edit.php3.38 ▲0.0251.54 ▲0.60
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.71 ▼18.76
Media Library /wp-admin/upload.php3.25 ▲0.0239.60 ▲5.12
目次&読破時間 /wp-admin/options-general.php?page=sc-toc3.2334.67

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

SC-TableOfContents: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.30 ▼0.061.78 ▼0.0444.33 ▲0.52
Dashboard /wp-admin2,202 ▲255.64 ▼0.0498.14 ▲4.7949.02 ▲5.92
Posts /wp-admin/edit.php2,104 ▲12.05 ▼0.0236.11 ▼4.1839.48 ▲1.99
Add New Post /wp-admin/post-new.php1,553 ▲822.76 ▼0.68681.90 ▲10.8658.27 ▲2.75
Media Library /wp-admin/upload.php1,407 ▲164.24 ▲0.03102.35 ▲1.3451.75 ▲8.71
目次&読破時間 /wp-admin/options-general.php?page=sc-toc9112.3228.5497.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
No output text or server-side errors detected on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: contents, table of contents, reading time, mokuji

sc-tableofcontents/sc-tableofcontents.php 92% from 13 tests

The main PHP script in "SC-TableOfContents" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 307 characters long)

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected429 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP48345333
CSS26684
JavaScript14012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity7.20
▷ Minimum method complexity2.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions18.33%
▷ Anonymous functions1191.67%
Constants37
▷ Global constants2567.57%
▷ Class constants1232.43%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected