72% wc-yabi

Code Review | Integrate Yabi for WooCommerce

WordPress plugin Integrate Yabi for WooCommerce scored72%from 54 tests.

About plugin

  • Plugin page: wc-yabi
  • Plugin version: 1.8.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 4, 2021
  • Latest release: Aug 26, 2023
  • Number of updates: 13
  • Update frequency: every 71.8 days
  • Top authors: kakaroto84 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /486 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.71ms] Passed 4 tests

Server-side resources used by Integrate Yabi for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.37 ▲10.30
Dashboard /wp-admin3.31 ▲0.0145.35 ▼9.66
Posts /wp-admin/edit.php3.36 ▲0.0148.40 ▼0.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.79 ▼19.68
Media Library /wp-admin/upload.php3.24 ▲0.0132.43 ▼5.12
Yabi /wp-admin/admin.php?page=yabi3.2730.29

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Integrate Yabi for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.69 ▲0.291.68 ▼0.0143.77 ▲3.44
Dashboard /wp-admin2,206 ▲184.85 ▼1.02110.20 ▲1.7739.85 ▲0.86
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0139.93 ▼1.6337.88 ▲2.03
Add New Post /wp-admin/post-new.php1,533 ▼023.11 ▼0.03637.01 ▼148.7457.38 ▼1.15
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0397.05 ▼15.6843.02 ▼4.37
Yabi /wp-admin/admin.php?page=yabi1,0442.0626.2124.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-yabi/wc-yabi.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: person in wp-content/plugins/wc-yabi/content/product.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-yabi/content/product-invoice.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-yabi/content/information.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wc-yabi/content/product.php:58
    • > PHP Notice
      Undefined variable: ok in wp-content/plugins/wc-yabi/content/admin.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-yabi/includes/ajax.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wc-yabi/content/product.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-yabi/content/admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-yabi/content/settings.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=yabi
    • > Network (severe)
    https://www.paypalobjects.com/en_CO/i/scr/pixel.gif - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: woocommerce, electronic invoice

wc-yabi/wc-yabi.php 92% from 13 tests

The primary PHP file in "Integrate Yabi for WooCommerce" version 1.8.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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
Everything looks great! No dangerous files found in this plugin2,672 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9254372,247
PO File2146148425

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
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 functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/CodigoQR.png2.15KB0.45KB▼ 78.91%