84% header-enhancement

Code Review | Header Enhancement

WordPress plugin Header Enhancement scored84%from 54 tests.

About plugin

  • Plugin page: header-enhancement
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: May 22, 2019
  • Latest release: Nov 15, 2023
  • Number of updates: 19
  • Update frequency: every 86.4 days
  • Top authors: catchthemes (84.21%)maheshmaharjan (21.05%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /11,182 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.99ms] Passed 4 tests

Server-side resources used by Header Enhancement
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1136.22 ▲2.03
Dashboard /wp-admin3.42 ▲0.1145.05 ▲1.97
Posts /wp-admin/edit.php3.53 ▲0.1746.18 ▼2.58
Add New Post /wp-admin/post-new.php6.02 ▲0.1289.12 ▼13.37
Media Library /wp-admin/upload.php3.34 ▲0.1036.73 ▲3.07

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Header Enhancement
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲3314.63 ▲0.411.74 ▼0.0842.55 ▲2.70
Dashboard /wp-admin2,218 ▲385.52 ▼0.1194.05 ▲2.2441.69 ▼3.78
Posts /wp-admin/edit.php2,120 ▲202.01 ▲0.0540.43 ▼4.0935.00 ▼3.29
Add New Post /wp-admin/post-new.php1,539 ▲823.22 ▼0.10680.86 ▲37.5158.09 ▲9.81
Media Library /wp-admin/upload.php1,420 ▲174.28 ▲0.0797.02 ▼2.2440.68 ▼2.09

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/header-enhancement/partials/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/header-enhancement/partials/display-dashboard.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/header-enhancement/partials/ctp-tabs-removal.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/header-enhancement/partials/CatchThemesThemePlugin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/header-enhancement/partials/footer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/header-enhancement/partials/header-enhancement-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: custom header, header video, header, mobile friendly header, header with sound...

header-enhancement/header-enhancement.php 92% from 13 tests

"Header Enhancement" version 1.5.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin2,278 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS3250901,208
PHP8163144792
JavaScript470169278

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity27.00
▷ Minimum class complexity7.00
▷ Maximum class complexity47.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%
images/free-plugin-246x116.png8.01KB3.81KB▼ 52.42%