89% pagseguro-internacional-payment-gateway-for-woocommerce

Code Review | PagSeguro International Payment Gateway for WooCommerce

WordPress plugin PagSeguro International Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: pagseguro-interna...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2023
  • Latest release: Mar 31, 2023
  • Number of updates: 15
  • Update frequency: every 2.3 days
  • Top authors: pluginspagseguro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Server-side resources used by PagSeguro International Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.41 ▲6.11
Dashboard /wp-admin3.31 ▲0.0145.85 ▼4.79
Posts /wp-admin/edit.php3.36 ▲0.0145.87 ▲0.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.44 ▼1.35
Media Library /wp-admin/upload.php3.23 ▲0.0136.24 ▲2.92

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PagSeguro International Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.25 ▼1.155.29 ▲3.2841.76 ▼3.10
Dashboard /wp-admin2,217 ▲265.82 ▲0.9395.88 ▼10.1043.94 ▼2.19
Posts /wp-admin/edit.php2,100 ▲112.02 ▲0.0039.36 ▼0.2837.43 ▲2.34
Add New Post /wp-admin/post-new.php1,544 ▲1223.32 ▲0.35607.06 ▼53.0951.25 ▼3.38
Media Library /wp-admin/upload.php1,399 ▲114.20 ▼0.1894.47 ▼7.0543.36 ▼1.16

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

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

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

pagseguro-internacional-payment-gateway-for-woocommerce/pagseguro-internacional-payment-gateway-for-woocommerce.php 77% from 13 tests

The primary PHP file in "PagSeguro International Payment Gateway for WooCommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("6.0" instead of "3.0.0")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 252 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,723 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,2709792,271
PO File2276546707
JavaScript6159104589
Markdown166079
CSS315177

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.10
▷ Minimum class complexity6.00
▷ Maximum class complexity136.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods102
▷ Static methods43.92%
▷ Public methods9391.18%
▷ Protected methods87.84%
▷ Private methods10.98%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/pagseguro.png4.16KB2.16KB▼ 48.11%
assets/img/paypal.png3.69KB1.77KB▼ 52.08%