83% add-number-to-headline

Code Review | Add Hierarchical Number To HeadLine

WordPress plugin Add Hierarchical Number To HeadLine scored83%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: 6.3.1
  • 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 /1,034 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Add Hierarchical Number To HeadLine
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.56 ▼5.19
Dashboard /wp-admin3.32 ▼0.0249.04 ▼10.69
Posts /wp-admin/edit.php3.37 ▲0.0249.94 ▼0.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.12 ▼15.14
Media Library /wp-admin/upload.php3.24 ▲0.0137.02 ▲0.78
AddHierarchicalHeadlineNumber /wp-admin/options-general.php?page=add-number-to-headline/add-hierarchical-number-to-headline.php3.2131.70

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Add Hierarchical Number To HeadLine
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.68 ▼0.871.69 ▼0.1242.55 ▼3.71
Dashboard /wp-admin2,207 ▲164.80 ▼0.10109.92 ▼1.2040.81 ▼3.19
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0138.74 ▼1.8536.85 ▲1.04
Add New Post /wp-admin/post-new.php1,536 ▼223.05 ▼0.15702.44 ▲5.2852.33 ▼3.28
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.1697.53 ▼4.5541.50 ▼4.66
AddHierarchicalHeadlineNumber /wp-admin/options-general.php?page=add-number-to-headline/add-hierarchical-number-to-headline.php8552.1922.3635.02

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: The official readme.txt might help

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
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)
  • 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")

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

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin