90% virtuaria-pagseguro

Code Review | Virtuaria - PagSeguro Crédito, Pix e Boleto

WordPress plugin Virtuaria - PagSeguro Crédito, Pix e Boleto scored90%from 54 tests.

About plugin

  • Plugin page: virtuaria-pagseguro
  • Plugin version: 2.7.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2022
  • Latest release: Nov 10, 2023
  • Number of updates: 47
  • Update frequency: every 10.0 days
  • Top authors: tecnologiavirtuaria (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

800+ active /7,014 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
This plugin's installer ran successfully

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

A check of server-side resources used by Virtuaria - PagSeguro Crédito, Pix e Boleto
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.91 ▼0.95
Dashboard /wp-admin3.33 ▼0.0245.00 ▼17.85
Posts /wp-admin/edit.php3.38 ▲0.0246.16 ▲0.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.41 ▼21.63
Media Library /wp-admin/upload.php3.25 ▲0.0235.40 ▲3.05

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Virtuaria - PagSeguro Crédito, Pix e Boleto: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6014.22 ▲0.151.52 ▼0.1437.76 ▼5.82
Dashboard /wp-admin2,212 ▲375.54 ▼0.1990.20 ▼14.9540.33 ▼7.79
Posts /wp-admin/edit.php2,121 ▲212.03 ▲0.0941.40 ▲0.1637.88 ▲2.09
Add New Post /wp-admin/post-new.php1,538 ▲1222.98 ▼0.13660.01 ▼42.5653.79 ▼6.23
Media Library /wp-admin/upload.php1,420 ▲264.18 ▲0.07101.71 ▼1.3844.35 ▼0.30

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: woocommerce, pagseguro, payment method, gateway, pix...

virtuaria-pagseguro/virtuaria-pagseguro.php Passed 13 tests

The primary PHP file in "Virtuaria - PagSeguro Crédito, Pix e Boleto" version 2.7.0 is used by WordPress to initiate all plugin functionality
61 characters long description:
Adiciona o método de pagamento PagSeguro a sua loja virtual.

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
No dangerous file extensions were detected4,884 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP123795123,540
CSS832677
PO File1130160375
JavaScript5220236
SVG11156

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity129.00
▷ Minimum class complexity11.00
▷ Maximum class complexity258.00
Average method complexity6.41
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods71
▷ Static methods22.82%
▷ Public methods6084.51%
▷ Protected methods11.41%
▷ Private methods1014.08%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/codigo-de-barras.png23.31KB9.04KB▼ 61.21%
public/images/pagseguro.png3.67KB2.47KB▼ 32.72%
public/images/loading.png5.59KB0.67KB▼ 88.06%
public/images/conectar.png8.19KB1.26KB▼ 84.60%
public/images/sem-ficha.png0.78KB0.92KB0.00%