93% add-number-to-headline

Code Review | Add Hierarchical Number To HeadLine

WordPress plugin Add Hierarchical Number To HeadLine scored 93% from 54 tests.

About plugin

  • Plugin page: add-number-to-hea...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.3
  • WordPress version: 5.9.2
  • First release: Sep 11, 2017
  • Latest release: Nov 14, 2017
  • Number of updates: 31
  • Update frequency: every 2.1 days
  • Top authors: xxxkosukexxx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 778 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼292.47ms] Passed 4 tests

An overview of server-side resources used by Add Hierarchical Number To HeadLine
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1157.14 ▲6.20
Dashboard /wp-admin3.50 ▲0.0931.97 ▼7.92
Posts /wp-admin/edit.php3.72 ▲0.0835.90 ▼2.27
Add New Post /wp-admin/post-new.php6.97 ▼0.0096.15 ▼1,155.41
Media Library /wp-admin/upload.php3.38 ▲0.0725.41 ▼4.27
AddHierarchicalHeadlineNumber /wp-admin/options-general.php?page=add-number-to-headline/add-hierarchical-number-to-headline.php3.3523.10

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Add Hierarchical Number To HeadLine: 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 ▲2615.86 ▼0.155.79 ▲0.272.21 ▲0.10
Dashboard /wp-admin2,897 ▲366.21 ▲0.09118.32 ▼16.13156.17 ▼1.17
Posts /wp-admin/edit.php2,693 ▼13.24 ▲0.0064.20 ▼1.39138.11 ▼4.22
Add New Post /wp-admin/post-new.php1,693 ▲3220.54 ▲4.46431.16 ▲17.91164.71 ▲12.61
Media Library /wp-admin/upload.php1,706 ▲55.53 ▼0.01144.80 ▲3.14186.90 ▼0.96
AddHierarchicalHeadlineNumber /wp-admin/options-general.php?page=add-number-to-headline/add-hierarchical-number-to-headline.php1,0832.5455.83136.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/add-number-to-headline/add-hierarchical-number-to-headline.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please a description for screenshot #2 in add-number-to-headline/assets to your readme.txt
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

add-number-to-headline/add-hierarchical-number-to-headline.php 85% from 13 tests

"Add Hierarchical Number To HeadLine" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-number-to-headline.php" instead of "add-hierarchical-number-to-headline.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin292 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25583289
CSS1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants00.00%
▷ Class constants20100.00%
▷ Public constants20100.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
No PNG files were detected