94% add-ids-to-header-tags

Code Review | Add IDs to Header Tags

WordPress plugin Add IDs to Header Tags scored 94% from 54 tests.

About plugin

  • Plugin page: add-ids-to-header...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Dec 3, 2013
  • Latest release: Dec 3, 2013
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: georgestephanis (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active / 2,344 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼293.95ms] Passed 4 tests

This is a short check of server-side resources used by Add IDs to Header Tags
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.51 ▲4.70
Dashboard /wp-admin3.42 ▲0.0133.23 ▼1.74
Posts /wp-admin/edit.php3.65 ▲0.0135.17 ▼1.55
Add New Post /wp-admin/post-new.php6.89 ▼0.0890.59 ▼1,171.51
Media Library /wp-admin/upload.php3.30 ▲0.0123.40 ▼1.01

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Add IDs to Header Tags: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1916.16 ▲0.525.57 ▼0.322.18 ▼0.71
Dashboard /wp-admin2,892 ▲316.14 ▼0.17116.49 ▼28.71152.64 ▼9.94
Posts /wp-admin/edit.php2,694 ▼03.24 ▼0.0064.40 ▲2.75142.74 ▲0.83
Add New Post /wp-admin/post-new.php1,661 ▼015.92 ▼0.24427.67 ▲10.51158.18 ▲6.14
Media Library /wp-admin/upload.php1,698 ▼35.56 ▲0.03137.78 ▼5.91185.47 ▼0.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script 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
Everything seems fine, however this is by no means 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-ids-to-header-tags/add-ids-to-header-tags.php:12

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

add-ids-to-header-tags/add-ids-to-header-tags.php Passed 13 tests

"Add IDs to Header Tags" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
93 characters long description:
Add an `id` attribute to header tags in your posts, to let users deep-link into your content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin24 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15824

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin