84% virtuaria-pagseguro-pix

Code Review | Virtuaria - Pagseguro Pix para Woocommerce

WordPress plugin Virtuaria - Pagseguro Pix para Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: virtuaria-pagsegu...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2022
  • Latest release: Jan 24, 2023
  • Number of updates: 5
  • Update frequency: every 19.0 days
  • Top authors: tecnologiavirtuaria (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Virtuaria - Pagseguro Pix para Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0139.00 ▼6.46
Dashboard /wp-admin3.36 ▼0.0248.86 ▼22.31
Posts /wp-admin/edit.php3.48 ▲0.0846.45 ▼6.62
Add New Post /wp-admin/post-new.php5.94 ▲0.0288.25 ▼13.21
Media Library /wp-admin/upload.php3.29 ▲0.0238.63 ▲4.32

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 170 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Virtuaria - Pagseguro Pix para Woocommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.25 ▼0.101.66 ▼0.1740.05 ▼4.85
Dashboard /wp-admin2,214 ▲345.57 ▼0.1088.52 ▼6.4741.60 ▲3.41
Posts /wp-admin/edit.php2,117 ▲172.03 ▲0.0241.04 ▲0.0837.78 ▲1.33
Add New Post /wp-admin/post-new.php1,545 ▲1923.23 ▼0.22638.31 ▲15.2452.76 ▼4.89
Media Library /wp-admin/upload.php1,419 ▲194.26 ▲0.09103.49 ▲5.2644.17 ▲3.10

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 48× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/promises/src/EachPromise.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/psr7/src/CachingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/psr7/src/Response.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/promises/src/Coroutine.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/virtuaria-pagseguro-pix/vendor/guzzlehttp/psr7/src/InflateStream.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: payment method, woocommerce, pix, payment, gateway...

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

The entry point to "Virtuaria - Pagseguro Pix para Woocommerce" version 1.0.1 is a PHP file that has certain tags in its header comment area
46 characters long description:
Adiciona o método de pagamento PagSeguro Pix.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin15,772 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
PHP1262,1806,10710,989
Markdown151,26503,647
JSON10001,045
CSS10054
JavaScript21030
YAML1007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.86
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces11
Interfaces26
Traits3
Classes81
▷ Abstract classes00.00%
▷ Concrete classes81100.00%
▷ Final classes3543.21%
Methods790
▷ Static methods14618.48%
▷ Public methods66383.92%
▷ Protected methods50.63%
▷ Private methods12215.44%
Functions124
▷ Named functions3427.42%
▷ Anonymous functions9072.58%
Constants65
▷ Global constants23.08%
▷ Class constants6396.92%
▷ Public constants5282.54%

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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/pague-com-pix.png2.70KB2.12KB▼ 21.33%