83% genesis-simple-headers

Code Review | Genesis Simple Headers

WordPress plugin Genesis Simple Headers scored83%from 54 tests.

About plugin

  • Plugin page: genesis-simple-he...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Mar 19, 2011
  • Latest release: Jun 2, 2014
  • Number of updates: 21
  • Update frequency: every 55.8 days
  • Top authors: vegasgeek (90.48%)mra13 (14.29%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active /48,002 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
Installer ran successfully

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

A check of server-side resources used by Genesis Simple Headers
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.34 ▼1.17
Dashboard /wp-admin3.31 ▲0.0145.14 ▼0.44
Posts /wp-admin/edit.php3.36 ▲0.0145.13 ▼0.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.92 ▼0.03
Media Library /wp-admin/upload.php3.23 ▲0.0135.13 ▲2.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Genesis Simple Headers
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.24 ▼1.161.82 ▲0.0741.23 ▼0.23
Dashboard /wp-admin2,209 ▲205.88 ▲0.9497.60 ▼7.5038.35 ▼6.48
Posts /wp-admin/edit.php2,089 ▼32.05 ▼0.0138.98 ▼3.5935.27 ▼0.86
Add New Post /wp-admin/post-new.php1,545 ▲1718.70 ▲0.44652.20 ▲24.5149.47 ▼11.37
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0593.87 ▼3.9840.56 ▼1.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/genesis-simple-headers/functions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/genesis-simple-headers/functions.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Screenshots: Add a description for screenshot #1 in genesis-simple-headers/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === genesis-simple-headers === )
The official readme.txt is a good inspiration

genesis-simple-headers/main.php 92% from 13 tests

The main PHP script in "Genesis Simple Headers" version 2.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("genesis-simple-headers.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin549 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23832549

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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