84% astra-theme-visual-hooks

Code Review | Astra Theme Visual Hooks

WordPress plugin Astra Theme Visual Hooks scored84%from 54 tests.

About plugin

  • Plugin page: astra-theme-visua...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Aug 30, 2017
  • Latest release: Aug 21, 2023
  • Number of updates: 17
  • Update frequency: every 128.4 days
  • Top authors: brainstormworg (70.59%)Nikschavan (29.41%)patilvikasj (11.76%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /31,579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by Astra Theme Visual Hooks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0446.09 ▼2.65
Dashboard /wp-admin3.31 ▲0.0059.16 ▲1.14
Posts /wp-admin/edit.php3.36 ▲0.0058.08 ▼6.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.74 ▼16.89
Media Library /wp-admin/upload.php3.23 ▲0.0042.69 ▲3.94

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Astra Theme Visual Hooks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▼0.211.94 ▼0.1443.26 ▲3.95
Dashboard /wp-admin2,195 ▲155.60 ▲0.0788.14 ▼1.8143.13 ▼2.32
Posts /wp-admin/edit.php2,097 ▼61.94 ▼0.1037.69 ▼3.6237.50 ▼1.95
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▲0.11633.75 ▼76.7656.75 ▲5.89
Media Library /wp-admin/upload.php1,403 ▲34.26 ▲0.06101.90 ▼19.6144.73 ▼2.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/astra-theme-visual-hooks/astra-theme-visual-hooks.php:20

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: theme hooks

astra-theme-visual-hooks/astra-theme-visual-hooks.php 92% from 13 tests

The primary PHP file in "Astra Theme Visual Hooks" version 1.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")

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 plugin284 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23429284

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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