83% boleto-cora

Code Review | Boleto Cora para WooCommerce ©

WordPress plugin Boleto Cora para WooCommerce © scored83%from 54 tests.

About plugin

  • Plugin page: boleto-cora
  • Plugin version: 1.1.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2021
  • Latest release: Mar 27, 2023
  • Number of updates: 32
  • Update frequency: every 24.3 days
  • Top authors: recaetano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,765 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Boleto Cora para WooCommerce ©
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.21 ▲1.30
Dashboard /wp-admin3.32 ▼0.0244.95 ▼21.34
Posts /wp-admin/edit.php3.37 ▲0.0243.91 ▼5.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0278.19 ▼22.64
Media Library /wp-admin/upload.php3.24 ▲0.0233.29 ▼0.93

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Boleto Cora para WooCommerce ©
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▼0.171.74 ▲0.1643.91 ▲3.21
Dashboard /wp-admin2,198 ▲185.65 ▲0.0296.88 ▲11.0943.29 ▲2.44
Posts /wp-admin/edit.php2,106 ▲62.03 ▲0.0533.14 ▼2.0135.99 ▲2.93
Add New Post /wp-admin/post-new.php1,532 ▲422.96 ▼0.01637.48 ▼15.3154.11 ▼10.82
Media Library /wp-admin/upload.php1,409 ▲124.21 ▲0.02107.97 ▲8.7747.63 ▲2.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/boleto-cora/cora-woocommerce.php:77
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/boleto-cora/includes/class-wc-cora-gateway.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #2, #3, #4, #5, #6 in boleto-cora/assets to your readme.txt
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

boleto-cora/cora-woocommerce.php 77% from 13 tests

"Boleto Cora para WooCommerce ©" version 1.1.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("boleto-cora.php" instead of "cora-woocommerce.php")

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
Good job! No executable or dangerous file extensions detected615 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3140228484
JavaScript11216105
JSON10017
Markdown2109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity30.50
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1976.00%
▷ Protected methods624.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png69.06KB33.71KB▼ 51.19%