89% genesis-featured-image-header

Code Review | Genesis Featured Image Header

WordPress plugin Genesis Featured Image Header scored 89% from 53 tests.

About plugin

  • Plugin page: genesis-featured-...
  • Plugin version: 1.2.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8.1
  • WordPress version: 5.8.1
  • First release: Oct 2, 2015
  • Latest release: Oct 13, 2021
  • Number of updates: 40
  • Update frequency: every 55.1 days
  • Top authors: scott.deluzio (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

600+ active / 16,459 total downloads

Benchmarks

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

A check of server-side resources used by Genesis Featured Image Header
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0034.81 ▼0.41
Dashboard /wp-admin3.06 ▲0.0140.52 ▼4.99
Posts /wp-admin/edit.php3.11 ▲0.0039.77 ▲3.13
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.72 ▼1,020.12
Media Library /wp-admin/upload.php3.00 ▼0.0133.41 ▼4.07
Featured Images /wp-admin/admin.php?page=gfih-settings2.7420.39

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 3 new options
New WordPress options
gfih_on_product
gfih_on_pages
gfih_action_location

Browser metrics Passed 4 tests

This is an overview of browser requirements for Genesis Featured Image Header
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲9616.16 ▲0.737.53 ▼0.5753.26 ▲1.71
Dashboard /wp-admin2,962 ▲1095.96 ▲0.12138.37 ▼12.4695.85 ▼9.71
Posts /wp-admin/edit.php2,703 ▼02.69 ▲0.0162.66 ▼2.9089.41 ▼2.16
Add New Post /wp-admin/post-new.php1,481 ▼37217.11 ▼1.96336.80 ▼24.75109.81 ▲6.82
Media Library /wp-admin/upload.php1,772 ▼35.01 ▼0.02140.40 ▼16.89112.04 ▼9.68
Featured Images /wp-admin/admin.php?page=gfih-settings280.900.0510.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/genesis-featured-image-header/lib/amplify.php
    • > /wp-content/plugins/genesis-featured-image-header/genesis-featured-image-header.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=gfih-settings
    • > Network (severe)
    wp-admin/admin.php?page=gfih-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: header, genesis, custom post type, featured image

genesis-featured-image-header/genesis-featured-image-header.php Passed 13 tests

The primary PHP file in "Genesis Featured Image Header" version 1.2.11 is used by WordPress to initiate all plugin functionality
110 characters long description:
Easily add a featured image to the header of every page on your site including Custom Post Type archive pages.

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
There were no executable files found in this plugin540 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP359116518
JavaScript112422

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.50
▷ Minimum class complexity4.00
▷ Maximum class complexity39.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods866.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin