83% hyba-for-woocommerce

Code Review | HyBa for Woocommerce

WordPress plugin HyBa for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: hyba-for-woocommerce
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.8
  • WordPress version: 6.3.1
  • First release: Aug 9, 2021
  • Latest release: Oct 28, 2021
  • Number of updates: 8
  • Update frequency: every 10.4 days
  • Top authors: hyba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /435 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by HyBa for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0340.66 ▼6.82
Dashboard /wp-admin3.39 ▲0.0454.24 ▼0.82
Posts /wp-admin/edit.php3.50 ▲0.1051.64 ▼5.19
Add New Post /wp-admin/post-new.php5.97 ▲0.0485.60 ▼19.69
Media Library /wp-admin/upload.php3.31 ▲0.0439.18 ▲0.44

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for HyBa for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.001.67 ▼0.1041.06 ▼0.16
Dashboard /wp-admin2,198 ▲215.62 ▼0.0183.81 ▼4.7140.19 ▼9.31
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0435.58 ▼5.0532.17 ▼3.09
Add New Post /wp-admin/post-new.php1,526 ▼022.92 ▼0.04663.40 ▼36.7869.07 ▲17.23
Media Library /wp-admin/upload.php1,394 ▼64.10 ▼0.0897.79 ▼7.3541.50 ▼8.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Hyba' not found in wp-content/plugins/hyba-for-woocommerce/includes/abstracts/class-wc-hyba-ipizza.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Hyba_Ipizza' not found in wp-content/plugins/hyba-for-woocommerce/includes/gateways/class-wc-hyba-pay-gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/hyba-for-woocommerce/includes/abstracts/class-wc-hyba.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Hyba_Ipizza' not found in wp-content/plugins/hyba-for-woocommerce/includes/gateways/class-wc-hyba-split-gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Hyba_Ipizza' not found in wp-content/plugins/hyba-for-woocommerce/includes/gateways/class-wc-hyba-plan-gateway.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (-)
You can take inspiration from this readme.txt

hyba-for-woocommerce/hyba-for-woocommerce.php 85% from 13 tests

"HyBa for Woocommerce" version 1.5.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • 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
  • Requires at least: The required version number must match the one declared in readme.txt ("4.1" instead of "2.6")

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 detected726 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7146307624
PO File13535102

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/hybapay.png5.79KB1.62KB▼ 71.98%
assets/img/hybasplit.png5.83KB1.65KB▼ 71.72%
assets/img/hybaplan.png4.02KB1.55KB▼ 61.45%