84% hero-section-genesis

Code Review | Hero Section for Genesis

WordPress plugin Hero Section for Genesis scored84%from 54 tests.

About plugin

  • Plugin page: hero-section-genesis
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2018
  • Latest release: Nov 9, 2018
  • Number of updates: 6
  • Update frequency: every 47.5 days
  • Top authors: oabadfol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,313 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.11ms] Passed 4 tests

An overview of server-side resources used by Hero Section for Genesis
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.61 ▼2.66
Dashboard /wp-admin3.34 ▲0.0448.35 ▼0.11
Posts /wp-admin/edit.php3.39 ▲0.0450.91 ▼0.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.42 ▲3.49
Media Library /wp-admin/upload.php3.26 ▲0.0434.37 ▼0.97

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hero Section for Genesis
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.27 ▼0.112.03 ▲0.1741.50 ▼5.58
Dashboard /wp-admin2,198 ▲185.62 ▼0.0580.28 ▼3.0037.87 ▼1.82
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0540.10 ▲1.6036.32 ▲0.10
Add New Post /wp-admin/post-new.php1,526 ▼723.00 ▼0.09655.15 ▲26.2057.77 ▲9.87
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0197.72 ▼0.3142.49 ▲0.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hero-section-genesis/includes/vhwp-hsfg-customizer.php:207

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: subtitle, css, customizer, hero, section...

hero-section-genesis/hero-section-for-genesis.php 85% from 13 tests

The entry point to "Hero Section for Genesis" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hero-section-genesis.php" instead of "hero-section-for-genesis.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected214 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP37073214

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.38
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin