78% vitt-attribute-hierarchy-for-woocommerce

Code Review | Vitt Attribute Hierarchy for WooCommerce

WordPress plugin Vitt Attribute Hierarchy for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: vitt-attribute-hi...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2023
  • Latest release: Feb 6, 2023
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: thevittfile (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 121 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.60MB] [CPU: ▼17.94ms] Passed 4 tests

An overview of server-side resources used by Vitt Attribute Hierarchy for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.10 ▲4.86
Dashboard /wp-admin3.38 ▲0.0845.35 ▼4.73
Posts /wp-admin/edit.php3.43 ▲0.0745.91 ▼8.24
Add New Post /wp-admin/post-new.php3.25 ▼2.6337.66 ▼61.03
Media Library /wp-admin/upload.php3.30 ▲0.0734.90 ▲2.23

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
attribute_connection
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Vitt Attribute Hierarchy for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.28 ▼1.021.92 ▲0.1648.79 ▲9.07
Dashboard /wp-admin2,222 ▲344.86 ▼0.01109.29 ▲8.5537.76 ▼10.33
Posts /wp-admin/edit.php2,102 ▲102.02 ▼0.0438.84 ▼1.9034.81 ▲0.09
Add New Post /wp-admin/post-new.php1,425 ▼11717.81 ▼0.52621.50 ▲18.4454.00 ▼11.75
Media Library /wp-admin/upload.php1,407 ▲194.20 ▲0.0595.82 ▼0.7341.92 ▼1.34
Sub Level Menu /wp-admin/vittfiles-sub-menu-attribute-config.php260.440.1314.50
Del attr conn /wp-admin/vittfiles-delete-attribute-connection-page.php260.440.125.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • attribute_connection
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× 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/vitt-attribute-hierarchy-for-woocommerce/include/responses.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/vitt-attribute-hierarchy-for-woocommerce/vitt-attribute-hierarchy.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/vittfiles-sub-menu-attribute-config.php
    • > Network (severe)
    wp-admin/vittfiles-sub-menu-attribute-config.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/vittfiles-delete-attribute-connection-page.php
    • > Network (severe)
    wp-admin/vittfiles-delete-attribute-connection-page.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

vitt-attribute-hierarchy-for-woocommerce/vitt-attribute-hierarchy.php 92% from 13 tests

The main PHP file in "Vitt Attribute Hierarchy for WooCommerce" 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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("vitt-attribute-hierarchy-for-woocommerce.php" instead of "vitt-attribute-hierarchy.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected554 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP73834505
Markdown124049

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin