84% woo-yapay

Code Review | WooCommerce Yapay Intermediador

WordPress plugin WooCommerce Yapay Intermediador scored84%from 54 tests.

About plugin

  • Plugin page: woo-yapay
  • Plugin version: 0.6.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Mar 14, 2018
  • Latest release: Sep 28, 2023
  • Number of updates: 147
  • Update frequency: every 13.8 days
  • Top authors: anava (97.28%)renanpfau (2.04%)thiagovindi (2.04%)

Code review

54 tests

User reviews

7 reviews

Install metrics

800+ active /11,629 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.08MB] [CPU: ▼8.95ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Yapay Intermediador
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.12 ▼5.29
Dashboard /wp-admin3.39 ▲0.0847.30 ▼3.54
Posts /wp-admin/edit.php3.44 ▲0.0850.97 ▲0.47
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.70 ▼22.66
Media Library /wp-admin/upload.php3.31 ▲0.0835.64 ▼4.29

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

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

Browser metrics Passed 4 tests

WooCommerce Yapay Intermediador: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.34 ▼0.011.89 ▲0.0544.53 ▼4.19
Dashboard /wp-admin2,195 ▲155.62 ▲0.1090.34 ▼3.9441.24 ▼2.09
Posts /wp-admin/edit.php2,100 ▲32.00 ▼0.0138.26 ▲1.6437.18 ▲0.52
Add New Post /wp-admin/post-new.php1,526 ▼023.94 ▲0.93701.87 ▲33.6158.31 ▼4.01
Media Library /wp-admin/upload.php1,400 ▼04.09 ▼0.0497.38 ▼12.4745.16 ▼1.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • woocommerce_yapay_intermediador_db_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
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 __() in wp-content/plugins/woo-yapay/templates/orders/wc_yapay_intermediador_bs_order.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-yapay/templates/orders/wc_yapay_intermediador_pix_order.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Página dos plugins no Wordpress, onde clicar para configurar as formas de pagamento), #2 (Página de configuração do plugin)
The official readme.txt is a good inspiration

woo-yapay/wc-yapay_intermediador.php 92% from 13 tests

"WooCommerce Yapay Intermediador" version 0.6.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-yapay.php" instead of "wc-yapay_intermediador.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin4,517 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP185591422,461
SVG19531,445
JavaScript1386472
CSS1291139

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity28.50
▷ Minimum class complexity2.00
▷ Maximum class complexity69.00
Average method complexity5.78
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods4495.65%
▷ Protected methods00.00%
▷ Private methods24.35%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
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
6 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/banner_semlogo_formas.png21.17KB6.59KB▼ 68.85%
assets/images/BannerYapayIntermediador890px.png28.35KB9.86KB▼ 65.21%
assets/images/paymentFlagsTc.png30.92KB8.74KB▼ 71.72%
assets/images/overlay.png0.27KB0.10KB▼ 62.37%
assets/images/close.png1.48KB1.73KB0.00%