90% f70-simple-table-of-contents

Code Review | F70 Simple Table of Contents

WordPress plugin F70 Simple Table of Contents scored90%from 54 tests.

About plugin

  • Plugin page: f70-simple-table-...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 4, 2020
  • Latest release: Oct 10, 2023
  • Number of updates: 20
  • Update frequency: every 58.1 days
  • Top authors: niao70 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /4,251 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.03MB] [CPU: ▼7.99ms] Passed 4 tests

A check of server-side resources used by F70 Simple Table of Contents
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.87 ▼4.02
Dashboard /wp-admin3.34 ▼0.0053.07 ▼11.11
Posts /wp-admin/edit.php3.39 ▲0.0451.40 ▼2.30
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.93 ▼14.54
Media Library /wp-admin/upload.php3.27 ▲0.0437.01 ▲5.01

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for F70 Simple Table of Contents
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.541.67 ▼0.0743.95 ▲0.90
Dashboard /wp-admin2,197 ▲205.57 ▼0.0591.21 ▲0.8640.81 ▲2.00
Posts /wp-admin/edit.php2,102 ▲22.02 ▲0.0041.03 ▲2.1836.93 ▲1.91
Add New Post /wp-admin/post-new.php6,244 ▲4,71618.95 ▼4.04915.74 ▲248.2667.69 ▲10.42
Media Library /wp-admin/upload.php1,396 ▼44.24 ▲0.03105.74 ▲7.8244.85 ▼2.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_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 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: toc, links, table of contents, navigation, indexes

f70-simple-table-of-contents/f70-simple-table-of-contents.php Passed 13 tests

The main PHP script in "F70 Simple Table of Contents" version 1.2.1 is automatically included on every request by WordPress
122 characters long description:
Display a table of contents in your posts by automatically generated from the headings. No Javascript code, simple to use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected303 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38144252
CSS26051

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity20.00
▷ Minimum class complexity12.00
▷ Maximum class complexity28.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin