93% lbk-table-of-content

Code Review | LBK Table Of Content

WordPress plugin LBK Table Of Content scored 93% from 54 tests.

About plugin

  • Plugin page: lbk-table-of-content
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.2-5.7
  • WordPress version: 5.9.2
  • First release: May 5, 2021
  • Latest release: Jun 21, 2021
  • Number of updates: 4
  • Update frequency: every 11.8 days
  • Top authors: serviceslbk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 178 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by LBK Table Of Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1051.21 ▲0.90
Dashboard /wp-admin3.44 ▲0.0432.42 ▼1.26
Posts /wp-admin/edit.php3.68 ▲0.0436.95 ▲0.42
Add New Post /wp-admin/post-new.php6.94 ▼0.0593.52 ▼1,195.19
Media Library /wp-admin/upload.php3.33 ▲0.0423.32 ▼0.76

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

LBK Table Of Content: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲4616.33 ▲0.636.77 ▲0.222.52 ▲0.32
Dashboard /wp-admin2,895 ▲346.15 ▲0.04124.58 ▼6.88161.19 ▼6.68
Posts /wp-admin/edit.php2,694 ▲33.24 ▲0.0162.82 ▼2.26139.54 ▼4.21
Add New Post /wp-admin/post-new.php1,668 ▼018.27 ▲0.12398.17 ▼31.37160.47 ▼3.57
Media Library /wp-admin/upload.php1,698 ▲35.54 ▲0.01139.70 ▲0.62188.16 ▼4.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lbk-table-of-content/includes/class.admin.php
    • > /wp-content/plugins/lbk-table-of-content/includes/admin-options-page.php
    • > /wp-content/plugins/lbk-table-of-content/lbk-toc.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (screenshot-1) image missing
You can look at the official readme.txt

lbk-table-of-content/lbk-toc.php 77% from 13 tests

Analyzing the main PHP file in "LBK Table Of Content" version 1.0.2
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lbk-table-of-content.php" instead of "lbk-toc.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin276 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP457171200
CSS112062
JavaScript182114

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.34
Average class complexity5.50
▷ Minimum class complexity3.00
▷ Maximum class complexity8.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods13
▷ Static methods753.85%
▷ Public methods861.54%
▷ Protected methods00.00%
▷ Private methods538.46%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin