88% woo-juno

Code Review | Juno para WooCommerce

WordPress plugin Juno para WooCommerce scored 88% from 54 tests.

About plugin

  • Plugin page: woo-juno
  • Plugin version: 2.4.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.8.2
  • WordPress version: 5.9.2
  • First release: Jul 9, 2019
  • Latest release: Nov 25, 2021
  • Number of updates: 45
  • Update frequency: every 19.3 days
  • Top authors: luismatias (42.22%)Amgnando (37.78%)marcofrasson (22.22%)junowoocommerce (4.44%)

Code review

54 tests

User reviews

15 reviews

Install metrics

4,000+ active / 37,552 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼299.78ms] Passed 4 tests

A check of server-side resources used by Juno para WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2453.18 ▼4.54
Dashboard /wp-admin3.58 ▲0.1843.96 ▲10.45
Posts /wp-admin/edit.php3.81 ▲0.1735.22 ▼8.58
Add New Post /wp-admin/post-new.php7.11 ▲0.1495.62 ▼1,180.36
Media Library /wp-admin/upload.php3.52 ▲0.2325.43 ▼5.65

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 204 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Juno para WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲3415.20 ▼0.456.71 ▲1.022.53 ▼0.36
Dashboard /wp-admin2,910 ▲496.14 ▼0.06119.41 ▼60.89159.99 ▼5.70
Posts /wp-admin/edit.php2,710 ▲253.24 ▲0.0063.20 ▼2.72144.83 ▼46.82
Add New Post /wp-admin/post-new.php1,677 ▲516.02 ▼5.55419.07 ▼26.36164.44 ▼30.38
Media Library /wp-admin/upload.php1,723 ▲255.54 ▲0.05145.03 ▼1.91189.51 ▼20.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-juno/templates/woocommerce/emails/juno/print-billet-button.php
  • 110× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woo-juno/vendor/chillerlan/php-qrcode/tests/QROptionsTest.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woo-juno/templates/woocommerce/checkout/juno/credit-card/checkout-form.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Juno\\Gateway\\Bank_Slip' not found in wp-content/plugins/woo-juno/classes/Gateway/Bank_Slip_Subscription.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'chillerlan\\Settings\\SettingsContainerInterface' not found in wp-content/plugins/woo-juno/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php:19
    • > PHP Notice
      Undefined variable: label in wp-content/plugins/woo-juno/templates/woocommerce/emails/juno/print-billet-button.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/woo-juno/vendor/chillerlan/php-qrcode/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-juno/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCodeTest\\QRTestAbstract' not found in wp-content/plugins/woo-juno/vendor/chillerlan/php-qrcode/tests/Data/MaskPatternTesterTest.php:18
    • > PHP Fatal error
      Trait 'WC_Juno\\Common\\Hooker_Trait' not found in wp-content/plugins/woo-juno/classes/Dashboard_Widget/Balance.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Picqer\\Barcode\\BarcodeGenerator' not found in wp-content/plugins/woo-juno/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorPNG.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/woo-juno/vendor/chillerlan/php-qrcode/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-juno/vendor/chillerlan/php-qrcode/examples/custom_output.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: boleto bancario, boleto, gateway, pagamento, subscriptions...

woo-juno/main.php 85% from 13 tests

The principal PHP file in "Juno para WooCommerce" v. 2.4.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "4.0.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-juno.php" instead of "main.php")

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
There were no executable files found in this plugin14,240 lines of code in 183 files:
LanguageFilesBlank linesComment linesLines of code
PHP1492,8053,38611,071
JSON5002,039
Markdown41460642
HTML2260169
XML600153
YAML627380
SVG20074
JavaScript70169
CSS2123

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.64
▷ Minimum class complexity1.00
▷ Maximum class complexity251.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces29
Interfaces3
Traits6
Classes92
▷ Abstract classes1111.96%
▷ Concrete classes8188.04%
▷ Final classes11.23%
Methods547
▷ Static methods234.20%
▷ Public methods41375.50%
▷ Protected methods13023.77%
▷ Private methods40.73%
Functions73
▷ Named functions5879.45%
▷ Anonymous functions1520.55%
Constants79
▷ Global constants11.27%
▷ Class constants7898.73%
▷ Public constants7393.59%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
vendor/chillerlan/php-qrcode/examples/example_image.png2.23KB1.09KB▼ 50.94%
vendor/chillerlan/php-qrcode/examples/octocat.png2.41KB2.46KB0.00%
vendor/chillerlan/php-qrcode/examples/example_svg.png15.55KB6.70KB▼ 56.90%