89% hm-content-toc

Code Review | HM Content TOC

WordPress plugin HM Content TOC scored89%from 54 tests.

About plugin

  • Plugin page: hm-content-toc
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.3
  • WordPress version: 6.3.1
  • First release: Oct 6, 2015
  • Latest release: Oct 7, 2015
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: dashaluna (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /3,801 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.09ms] Passed 4 tests

Server-side resources used by HM Content TOC
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0937.25 ▼8.96
Dashboard /wp-admin3.40 ▲0.0942.99 ▼6.67
Posts /wp-admin/edit.php3.51 ▲0.1647.56 ▲2.71
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.38 ▼11.44
Media Library /wp-admin/upload.php3.32 ▲0.0937.11 ▲3.49
HM Content TOC Settings /wp-admin/options-general.php?page=hm-toc-settings3.2926.96

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for HM Content TOC
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.19 ▼1.561.80 ▲0.0538.86 ▼6.97
Dashboard /wp-admin2,210 ▲195.90 ▼0.00110.27 ▼2.8442.63 ▼1.20
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0340.93 ▲5.6841.03 ▲9.82
Add New Post /wp-admin/post-new.php1,552 ▲2918.38 ▼4.49608.22 ▼33.7866.60 ▲17.51
Media Library /wp-admin/upload.php1,395 ▲44.18 ▼0.0397.49 ▼12.4642.98 ▲0.89
HM Content TOC Settings /wp-admin/options-general.php?page=hm-toc-settings8042.0628.2331.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

hm-content-toc/hm-content-toc.php 92% from 13 tests

The main file in "HM Content TOC" v. 1.0.1 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:
  • Description: Keep the plugin description shorter than 140 characters (currently 280 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected551 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3138323378
PO File33896164
Markdown1609

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity12.00
▷ Minimum class complexity8.00
▷ Maximum class complexity16.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods1672.73%
▷ Protected methods627.27%
▷ Private methods00.00%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin