84% paypal-brasil-para-woocommerce

Code Review | PayPal Brasil para WooCommerce

WordPress plugin PayPal Brasil para WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: paypal-brasil-par...
  • Plugin version: 1.4.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1
  • WordPress version: 6.3.1
  • First release: Sep 26, 2019
  • Latest release: Oct 16, 2023
  • Number of updates: 101
  • Update frequency: every 14.7 days
  • Top authors: bycoders (44.55%)apuhlmann (42.57%)elias.jnior (12.87%)suporteppbr (2.97%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /60,977 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼16.42ms] Passed 4 tests

Analyzing server-side resources used by PayPal Brasil para WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3937.61 ▼0.73
Dashboard /wp-admin3.54 ▲0.1932.69 ▼25.19
Posts /wp-admin/edit.php3.67 ▲0.3138.29 ▼10.99
Add New Post /wp-admin/post-new.php5.76 ▼0.1277.09 ▼23.13
Media Library /wp-admin/upload.php3.54 ▲0.3130.74 ▼6.36

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 111 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by PayPal Brasil para WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.59 ▲0.031.95 ▲0.4342.45 ▲3.62
Dashboard /wp-admin2,204 ▲245.62 ▼0.0390.01 ▲4.4047.74 ▲6.52
Posts /wp-admin/edit.php2,106 ▲62.02 ▲0.0039.17 ▲4.5338.08 ▲3.49
Add New Post /wp-admin/post-new.php1,538 ▲1223.12 ▲0.03616.01 ▼38.4254.49 ▼7.29
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.0496.36 ▼3.1141.55 ▼6.07

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 detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/paypal-brasil-para-woocommerce/includes/views/checkout/html-paypal-iframe-br.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/paypal-brasil-para-woocommerce/includes/views/admin-options/admin-options-plus/admin-options-plus-template.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/paypal-brasil-para-woocommerce/includes/views/admin-options/admin-options-plus/admin-options-plus.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/paypal-brasil-para-woocommerce/includes/views/admin-options/admin-options-spb/admin-options-spb.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/paypal-brasil-para-woocommerce/includes/views/admin-options/admin-options-spb/admin-options-spb-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_woocommerce_price_format() in wp-content/plugins/paypal-brasil-para-woocommerce/includes/views/checkout/html-paypal-iframe-us.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • License uri: Invalid url: "[http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)"
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

paypal-brasil-para-woocommerce/paypal-brasil-para-woocommerce.php Passed 13 tests

The entry point to "PayPal Brasil para WooCommerce" version 1.4.9 is a PHP file that has certain tags in its header comment area
79 characters long description:
Adicione facilmente opções de pagamento do PayPal à sua loja do WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin6,633 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP451,1421,6945,632
PO File1240372529
CSS6326334
JSON20079
XML18231
Markdown19018
JavaScript1001610

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity30.35
▷ Minimum class complexity1.00
▷ Maximum class complexity167.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes20
▷ Abstract classes210.00%
▷ Concrete classes1890.00%
▷ Final classes00.00%
Methods223
▷ Static methods2310.31%
▷ Public methods18482.51%
▷ Protected methods94.04%
▷ Private methods3013.45%
Functions22
▷ Named functions1881.82%
▷ Anonymous functions418.18%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
17 compressed PNG files occupy 0.91MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/banner-spb.png24.54KB25.77KB0.00%
assets/images/saiba-mais.png81.54KB86.59KB0.00%
assets/images/banner-plus-2x.png324.49KB97.99KB▼ 69.80%
assets/images/buttons/pill-silver.png2.02KB2.09KB0.00%
assets/images/buttons/rect-blue.png1.80KB1.81KB0.00%