90% genesis-custom-headers

Code Review | Genesis Custom Headers

WordPress plugin Genesis Custom Headers scored90%from 54 tests.

About plugin

  • Plugin page: genesis-custom-he...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.7
  • WordPress version: 6.3.1
  • First release: Jul 11, 2014
  • Latest release: Dec 17, 2022
  • Number of updates: 18
  • Update frequency: every 171.2 days
  • Top authors: ndiego (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /92,408 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.58ms] Passed 4 tests

This is a short check of server-side resources used by Genesis Custom Headers
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.43 ▼4.20
Dashboard /wp-admin3.31 ▲0.0058.02 ▲3.60
Posts /wp-admin/edit.php3.36 ▲0.0053.50 ▼3.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.95 ▼1.28
Media Library /wp-admin/upload.php3.23 ▲0.0036.81 ▼1.31

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Genesis Custom Headers
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼0.971.77 ▼0.1841.49 ▼5.72
Dashboard /wp-admin2,206 ▲214.86 ▼0.95111.39 ▼7.1743.11 ▼2.34
Posts /wp-admin/edit.php2,092 ▲31.98 ▲0.0239.69 ▲2.2535.09 ▼0.82
Add New Post /wp-admin/post-new.php1,520 ▼1323.35 ▼0.04638.95 ▼26.6052.79 ▲1.95
Media Library /wp-admin/upload.php1,385 ▼64.18 ▼0.09107.95 ▲8.3143.34 ▲0.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: custom header, header, featured image, genesis, genesiswp...

genesis-custom-headers/genesis-custom-headers.php Passed 13 tests

The primary PHP file in "Genesis Custom Headers" version 1.1.6 is used by WordPress to initiate all plugin functionality
117 characters long description:
Adds custom headers to pages, posts, and custom post types in Genesis themes. The Genesis Framework 2.0+ is required.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,259 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP62532191,050
CSS2224121
JavaScript1211488

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected