84% automatic-heating-numbering

Code Review | Automatic Heading Number

WordPress plugin Automatic Heading Number scored84%from 54 tests.

About plugin

  • Plugin page: automatic-heating...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2013
  • Latest release: Oct 19, 2013
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: revzap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,275 total downloads


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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.53ms] Passed 4 tests

Server-side resources used by Automatic Heading Number
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.60 ▼3.38
Dashboard /wp-admin3.35 ▲0.0546.55 ▼4.36
Posts /wp-admin/edit.php3.46 ▲0.1146.25 ▼0.04
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.75 ▼11.21
Media Library /wp-admin/upload.php3.27 ▲0.0533.14 ▼3.18
Numbered Headings /wp-admin/options-general.php?page=numbered-settings3.2429.36

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Automatic Heading Number
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.27 ▼1.001.50 ▼0.3442.00 ▼7.17
Dashboard /wp-admin2,207 ▲195.79 ▲0.9097.79 ▼16.1841.40 ▼2.01
Posts /wp-admin/edit.php2,072 ▼172.02 ▲0.0336.18 ▲0.1932.82 ▼5.34
Add New Post /wp-admin/post-new.php6,232 ▲4,71826.02 ▲8.53866.82 ▲192.8755.40 ▼9.67
Media Library /wp-admin/upload.php1,389 ▲44.27 ▲0.0494.36 ▼2.3841.38 ▼3.25
Numbered Headings /wp-admin/options-general.php?page=numbered-settings7942.0222.6026.65

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/automatic-heating-numbering/number-headings.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: list blogs, heading, number, numbering, h3

automatic-heating-numbering/number-headings.php 85% from 13 tests

The primary PHP file in "Automatic Heading Number" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("automatic-heating-numbering.php" instead of "number-headings.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 216 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 detected178 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1593.75%
▷ Protected methods16.25%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
There were not PNG files found in your plugin