84% f13-toc

Code Review | F13 Table of Contents

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

About plugin

  • Plugin page: f13-toc
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2021
  • Latest release: Oct 19, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: f13dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 320 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.01MB] [CPU: ▼3.70ms] Passed 4 tests

This is a short check of server-side resources used by F13 Table of Contents
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.59 ▼10.96
Dashboard /wp-admin3.31 ▲0.0145.25 ▼3.29
Posts /wp-admin/edit.php3.36 ▲0.0046.23 ▼3.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.96 ▲3.99
Media Library /wp-admin/upload.php3.23 ▲0.0036.23 ▲3.43

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for F13 Table of Contents
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.23 ▼1.364.51 ▲2.1644.55 ▲0.41
Dashboard /wp-admin2,203 ▲155.85 ▲0.74106.78 ▼5.3439.51 ▼0.41
Posts /wp-admin/edit.php2,092 ▼02.01 ▲0.0239.74 ▼13.6135.52 ▼8.89
Add New Post /wp-admin/post-new.php1,542 ▲818.42 ▼4.75597.16 ▼64.9855.38 ▲3.71
Media Library /wp-admin/upload.php1,391 ▼04.26 ▲0.0695.01 ▼5.5940.05 ▼5.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/f13-toc/f13-toc.php on line 14
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/f13-toc/f13-toc.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/f13-toc/f13-toc.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2 in f13-toc/assets to your readme.txt
The official readme.txt is a good inspiration

f13-toc/f13-toc.php Passed 13 tests

This is the main PHP file of "F13 Table of Contents" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
37 characters long description:
Table of contents for pages and posts

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
There were no executable files found in this plugin196 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21719183
CSS10013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.00
▷ Minimum class complexity4.00
▷ Maximum class complexity22.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin