83% iugu-woocommerce

Code Review | WooCommerce iugu

WordPress plugin WooCommerce iugu scored83%from 54 tests.

About plugin

  • Plugin page: iugu-woocommerce
  • Plugin version: 3.1.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-4.9
  • WordPress version: 6.3.1
  • First release: Mar 8, 2015
  • Latest release: Oct 30, 2023
  • Number of updates: 75
  • Update frequency: every 42.2 days
  • Top authors: iugu (60%)claudiosanches (24%)andsnleo (18.67%)

Code review

54 tests

User reviews

11 reviews

Install metrics

600+ active /14,606 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.17ms] Passed 4 tests

A check of server-side resources used by WooCommerce iugu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.82 ▲0.61
Dashboard /wp-admin3.35 ▲0.0047.35 ▼16.64
Posts /wp-admin/edit.php3.40 ▲0.0443.38 ▼3.40
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.07 ▼14.54
Media Library /wp-admin/upload.php3.27 ▲0.0432.37 ▼2.08

Server storage [IO: ▲0.39MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • You have illegally modified 1 file (0.00KB) outside of "wp-content/plugins/iugu-woocommerce/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/iugu-woocommerce/wiki/Configura\303\247\303\243o.md"
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce iugu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.51 ▼0.121.77 ▼0.1543.45 ▲4.65
Dashboard /wp-admin2,198 ▲305.59 ▼0.0395.12 ▲9.1742.33 ▼1.11
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0534.65 ▼2.1934.34 ▼0.40
Add New Post /wp-admin/post-new.php1,526 ▼223.79 ▲0.76683.91 ▲3.8353.62 ▼22.67
Media Library /wp-admin/upload.php1,394 ▼64.22 ▲0.0595.03 ▼7.4943.53 ▼1.21

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/iugu-woocommerce/views/admin-notices/html-notice-woocommerce-account.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

iugu-woocommerce/iugu-woocommerce.php 77% from 13 tests

"WooCommerce iugu" version 3.1.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/lang/")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.9" instead of "5.6")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin5,544 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP323187973,993
JavaScript158989778
PO File1258390574
Markdown9410101
CSS411198

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity44.00
▷ Minimum class complexity1.00
▷ Maximum class complexity257.00
Average method complexity5.05
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods138
▷ Static methods1712.32%
▷ Public methods11381.88%
▷ Protected methods1712.32%
▷ Private methods85.80%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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
PNG images were not found in this plugin