10% hero-for-genesis-framework

Code Review | Hero for Genesis Framework

WordPress plugin Hero for Genesis Framework scored10%from 54 tests.

About plugin

  • Plugin page: hero-for-genesis-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 6, 2015
  • Latest release: Nov 10, 2015
  • Number of updates: 11
  • Update frequency: every 0.5 days
  • Top authors: phpbits (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,931 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/hero-for-genesis-framework/core/functions.admin.php+327
    Function create_function() is deprecated

Server metrics [RAM: ▼1.88MB] [CPU: ▼53.95ms] Passed 4 tests

An overview of server-side resources used by Hero for Genesis Framework
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.355.80 ▼36.68
Dashboard /wp-admin2.13 ▼1.176.12 ▼45.16
Posts /wp-admin/edit.php2.13 ▼1.237.43 ▼43.47
Add New Post /wp-admin/post-new.php2.13 ▼3.766.56 ▼90.47
Media Library /wp-admin/upload.php2.13 ▼1.106.96 ▼28.62
Hero for Genesis /wp-admin/admin.php?page=hero4genesis_plugin_options2.137.21

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
hero4genesis_general_settings
widget_hero4genesis_image
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hero for Genesis Framework
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18313.79 ▼0.606.28 ▲4.4345.04 ▲4.19
Dashboard /wp-admin2,240 ▲375.11 ▲0.19100.33 ▼6.8643.83 ▼1.58
Posts /wp-admin/edit.php2,121 ▲212.27 ▲0.2140.25 ▼2.9536.29 ▲1.33
Add New Post /wp-admin/post-new.php1,540 ▲723.37 ▲0.25674.21 ▲69.3635.38 ▼21.90
Media Library /wp-admin/upload.php1,419 ▲224.44 ▲0.24100.30 ▼39.7351.18 ▼0.03
Hero for Genesis /wp-admin/admin.php?page=hero4genesis_plugin_options2,4142.9094.1528.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/hero-for-genesis-framework/core/functions.admin.php+327
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_hero4genesis_image
    • db_upgraded
    • hero4genesis_general_settings

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=hero4genesis_plugin_options
    • > Deprecated in wp-content/plugins/hero-for-genesis-framework/core/functions.admin.php+327
    Function create_function() is deprecated
    • > GET request to /wp-admin/admin.php?page=hero4genesis_plugin_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=hero4genesis_plugin_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hero-for-genesis-framework/core/functions.admin.php:327
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hero-for-genesis-framework/core/functions.display.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hero-for-genesis-framework/core/functions.widgets.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hero-for-genesis-framework/core/widgets/widget.image.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hero-for-genesis-framework/core/functions.enqueue.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 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
10 plugin tags: custom genesis header, hero image, genesiswp, genesis header, header...

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

The main PHP file in "Hero for Genesis Framework" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; 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 ("hero-for-genesis-framework.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin659 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP757128398
PO File14747144
Sass12064
JavaScript310951
CSS3122

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity21.00
▷ Minimum class complexity2.00
▷ Maximum class complexity57.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin