90% woocommerce-pagseguro

Code Review | Claudio Sanches - PagSeguro for WooCommerce

WordPress plugin Claudio Sanches - PagSeguro for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-pagse...
  • Plugin version: 2.14.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Sep 27, 2012
  • Latest release: Aug 11, 2020
  • Number of updates: 134
  • Update frequency: every 21.5 days
  • Top authors: claudiosanches (99.25%)Gabriel Reguly (1.49%)

Code review

54 tests

User reviews

907 reviews

Install metrics

30,000+ active /571,906 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Claudio Sanches - PagSeguro for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.57 ▼4.74
Dashboard /wp-admin3.31 ▼0.0348.08 ▼12.71
Posts /wp-admin/edit.php3.36 ▲0.0148.95 ▲0.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.06 ▼7.25
Media Library /wp-admin/upload.php3.24 ▲0.0134.27 ▲2.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Claudio Sanches - PagSeguro for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5514.25 ▼0.311.62 ▼0.1039.31 ▼2.10
Dashboard /wp-admin2,207 ▲305.58 ▼0.0984.37 ▼5.6737.20 ▲0.77
Posts /wp-admin/edit.php2,113 ▲132.02 ▲0.0237.47 ▲1.3938.69 ▲1.95
Add New Post /wp-admin/post-new.php1,538 ▲1223.45 ▲0.34600.55 ▼14.0567.34 ▲6.97
Media Library /wp-admin/upload.php1,406 ▲34.21 ▼0.07111.70 ▲12.2243.63 ▼3.74

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: payment, pagseguro, woocommerce

woocommerce-pagseguro/woocommerce-pagseguro.php 92% from 13 tests

The main file in "Claudio Sanches - PagSeguro for WooCommerce" v. 2.14.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin2,096 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP183806471,668
JavaScript46579255
CSS2295173

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity61.00
▷ Minimum class complexity14.00
▷ Maximum class complexity108.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods79
▷ Static methods1113.92%
▷ Public methods5772.15%
▷ Protected methods2126.58%
▷ Private methods11.27%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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
assets/images/pagseguro.png5.39KB2.31KB▼ 57.08%
assets/images/brazilian-flag.png4.32KB0.97KB▼ 77.62%
assets/images/transparent-checkout-icons.png14.57KB7.22KB▼ 50.42%