83% header-customizer-lite

Code Review | Header Customizer Lite

WordPress plugin Header Customizer Lite scored83%from 54 tests.

About plugin

  • Plugin page: header-customizer...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 24, 2016
  • Latest release: Mar 25, 2016
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: markzero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /13,611 total downloads

Benchmarks

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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Header Customizer Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0429.46 ▼13.31
Dashboard /wp-admin3.32 ▼0.0349.04 ▼15.41
Posts /wp-admin/edit.php3.37 ▲0.0148.48 ▼0.56
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.95 ▼21.88
Media Library /wp-admin/upload.php3.24 ▲0.0138.43 ▲2.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Header Customizer Lite: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲17013.79 ▼0.768.65 ▲6.6241.20 ▼4.69
Dashboard /wp-admin2,200 ▲235.61 ▲0.0188.45 ▼5.3038.69 ▼5.00
Posts /wp-admin/edit.php2,102 ▲22.01 ▼0.0040.18 ▲5.5639.04 ▲2.83
Add New Post /wp-admin/post-new.php1,539 ▲1118.00 ▼5.10619.52 ▼11.0163.62 ▼1.74
Media Library /wp-admin/upload.php1,405 ▲24.27 ▼0.0299.07 ▼0.4842.31 ▼3.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • 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
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/header-customizer-lite/header-customizer.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/header-customizer-lite/ext/google-font-dropdown-control/select-box.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/header-customizer-lite/inc/nav-walker.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/header-customizer-lite/ext/alpha-control.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'HC_Customize_General' not found in wp-content/plugins/header-customizer-lite/customize/main.php:179

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: There are too many tags (18 tag instead of maximum 10)
The official readme.txt might help

header-customizer-lite/header-customizer.php 77% from 13 tests

Analyzing the main PHP file in "Header Customizer Lite" version 1.0.0
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("header-customizer-lite.php" instead of "header-customizer.php")
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin14,102 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP2445328913,880
JavaScript3228160
CSS26050
SVG10012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.67
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods29
▷ Static methods413.79%
▷ Public methods2896.55%
▷ Protected methods13.45%
▷ Private methods00.00%
Functions26
▷ Named functions2596.15%
▷ Anonymous functions13.85%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
ext/img/transparency-grid.png2.58KB2.80KB0.00%