83% fygaro

Code Review | Fygaro WC Plugin

WordPress plugin Fygaro WC Plugin scored83%from 54 tests.

About plugin

  • Plugin page: fygaro
  • Plugin version: 0.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.4
  • WordPress version: 6.3.1
  • First release: Aug 5, 2022
  • Latest release: Nov 8, 2023
  • Number of updates: 26
  • Update frequency: every 17.7 days
  • Top authors: fygaro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,463 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 gracefully, with no errors

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

Server-side resources used by Fygaro WC Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.44 ▼1.67
Dashboard /wp-admin3.32 ▼0.0349.76 ▼17.79
Posts /wp-admin/edit.php3.37 ▲0.0147.03 ▼2.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.66 ▼15.51
Media Library /wp-admin/upload.php3.24 ▲0.0134.29 ▼0.56

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fygaro WC Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲1814.35 ▼0.031.63 ▼0.2842.20 ▼1.60
Dashboard /wp-admin2,195 ▲215.58 ▼0.0688.19 ▼9.0036.92 ▼6.84
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0236.35 ▼4.1834.83 ▼1.27
Add New Post /wp-admin/post-new.php1,526 ▼023.02 ▼0.22673.09 ▼53.5749.08 ▼10.22
Media Library /wp-admin/upload.php1,397 ▼34.19 ▲0.0198.30 ▼3.0645.28 ▲2.64

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 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/fygaro/includes/blocks/class-wc-fygaro-payments-blocks.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Fygaro WooCommerce Plugin)
You can look at the official readme.txt

fygaro/woocommerce-gateway-fygaro.php 69% from 13 tests

"Fygaro WC Plugin" version 0.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fygaro.php" instead of "woocommerce-gateway-fygaro.php")
  • Domain Path: The domain path points to a folder that does not exist ("/i18n/languages/")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "4.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin19,532 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JSON20018,725
PHP5130246424
JavaScript52614181
SVG40388
CSS113343
XML17642
Bourne Shell14321
Markdown1408

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity13.00
▷ Minimum class complexity3.00
▷ Maximum class complexity33.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods18
▷ Static methods633.33%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.16MB with 0.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fygaro.png43.20KB21.17KB▼ 51.00%
assets/images/tasa_cero.png60.83KB3.60KB▼ 94.08%
assets/images/mini_cuotas.png57.69KB3.70KB▼ 93.59%