89% woo-pagseguro-rm

Code Review | Módulo PagSeguro

WordPress plugin Módulo PagSeguro scored89%from 54 tests.

About plugin

  • Plugin page: woo-pagseguro-rm
  • Plugin version: 3.16.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 6, 2019
  • Latest release: Oct 11, 2023
  • Number of updates: 120
  • Update frequency: every 12.2 days
  • Top authors: martins56 (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

3,000+ active /55,011 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Módulo PagSeguro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.62 ▲3.41
Dashboard /wp-admin3.31 ▲0.0150.04 ▼4.44
Posts /wp-admin/edit.php3.36 ▲0.0151.87 ▼8.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.01 ▼16.01
Media Library /wp-admin/upload.php3.24 ▲0.0138.69 ▲3.32

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Módulo PagSeguro
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.34 ▲0.191.76 ▲0.0245.24 ▼0.28
Dashboard /wp-admin2,207 ▲275.59 ▼0.0187.21 ▼13.7043.84 ▼3.01
Posts /wp-admin/edit.php2,116 ▲162.00 ▼0.1439.81 ▲1.4933.78 ▼2.78
Add New Post /wp-admin/post-new.php1,540 ▲1423.28 ▲0.06668.18 ▲25.6451.08 ▼1.33
Media Library /wp-admin/upload.php1,409 ▲124.22 ▲0.0497.63 ▼6.6346.87 ▼0.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Configurações do plugin.), #2 (Método de pagamento na página de finalizar o pedido.), #3 (Exemplo do Lightbox funcionando com o Sandbox do PagSeguro.), #4 (Pagamento com cartão de crédito usando o Checkout Transparente.), #5 (Pagamento com debito online usando o Checkout Transparente.), #6 (Pagamento com boleto bancário usando o Checkout Transparente.)
You can take inspiration from this readme.txt

woo-pagseguro-rm/woo-pagseguro-rm.php 92% from 13 tests

The main file in "Módulo PagSeguro" v. 3.16.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0.0")

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
Everything looks great! No dangerous files found in this plugin3,511 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP174597452,210
PO File1219379595
JavaScript5101172423
CSS2295173
JSON20076
SVG20023
XML12011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity77.50
▷ Minimum class complexity18.00
▷ Maximum class complexity142.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods92
▷ Static methods1111.96%
▷ Public methods6772.83%
▷ Protected methods2426.09%
▷ Private methods11.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 1.04MB with 0.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/brazilian-flag.png4.32KB0.97KB▼ 77.62%
assets/screenshot-1.png356.19KB124.75KB▼ 64.98%
assets/banner-1544x500.png373.09KB185.97KB▼ 50.16%
assets/screenshot-4.png35.71KB17.61KB▼ 50.69%
assets/icon-256x256.png23.55KB8.11KB▼ 65.54%