84% home-page-banner-for-astra-theme

Code Review | Home Page Banner for Astra Theme

WordPress plugin Home Page Banner for Astra Theme scored84%from 54 tests.

About plugin

  • Plugin page: home-page-banner-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 11, 2018
  • Latest release: Aug 22, 2023
  • Number of updates: 19
  • Update frequency: every 100.1 days
  • Top authors: brainstormworg (73.68%)Nikschavan (26.32%)patilvikasj (10.53%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /56,372 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
Install script ran successfully

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

An overview of server-side resources used by Home Page Banner for Astra Theme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0638.29 ▼6.65
Dashboard /wp-admin3.32 ▲0.0245.05 ▼1.54
Posts /wp-admin/edit.php3.43 ▲0.0847.79 ▼2.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.26 ▼12.02
Media Library /wp-admin/upload.php3.24 ▲0.0135.08 ▲1.07

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Home Page Banner for Astra Theme
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.66 ▼0.695.05 ▲3.2640.06 ▼1.67
Dashboard /wp-admin2,223 ▲354.87 ▼1.0399.52 ▼3.9237.58 ▼7.43
Posts /wp-admin/edit.php2,102 ▲132.06 ▲0.0337.29 ▼4.2134.79 ▼0.23
Add New Post /wp-admin/post-new.php1,543 ▲2923.04 ▲5.40645.29 ▼46.8448.56 ▼3.93
Media Library /wp-admin/upload.php1,405 ▲174.35 ▲0.17100.48 ▼0.9442.92 ▼2.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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 | 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
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'HOME_PAGE_BANNER_DIRinc/classes/class-astra-home-page-banner-loader.php' (include_path='.:/usr/share/php') in wp-content/plugins/home-page-banner-for-astra-theme/inc/class-astra-home-page-banner.php on line 41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/home-page-banner-for-astra-theme/inc/classes/class-astra-home-page-banner-loader.php:40
    • > PHP Warning
      require_once(HOME_PAGE_BANNER_DIRinc/classes/class-astra-home-page-banner-loader.php): failed to open stream: No such file or directory in wp-content/plugins/home-page-banner-for-astra-theme/inc/class-astra-home-page-banner.php on line 41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/home-page-banner-for-astra-theme/home-page-banner-for-astra-theme.php:27
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/home-page-banner-for-astra-theme/inc/classes/customizer-panels-and-sections.php on line 13
    • > PHP Warning
      Use of undefined constant HOME_PAGE_BANNER_DIR - assumed 'HOME_PAGE_BANNER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/home-page-banner-for-astra-theme/inc/class-astra-home-page-banner.php on line 41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/home-page-banner-for-astra-theme/inc/classes/class-astra-home-page-banner-markup.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/home-page-banner-for-astra-theme/inc/classes/dynamic.css.php:9
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_panel() on null in wp-content/plugins/home-page-banner-for-astra-theme/inc/classes/customizer-panels-and-sections.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: banner image, banner, astra addons, astra, home page banner

home-page-banner-for-astra-theme/home-page-banner-for-astra-theme.php 92% from 13 tests

The main PHP file in "Home Page Banner for Astra Theme" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected662 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP9133218575
JavaScript3235370
CSS12417

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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