83% paypay-pagamentos-multibanco-e-cartao-de-creditodebito

Code Review | PayPay - Pagamentos Multibanco, Cartão de Crédito/Débito e MB WAY

WordPress plugin PayPay - Pagamentos Multibanco, Cartão de Crédito/Débito e MB WAY scored83%from 54 tests.

About plugin

  • Plugin page: paypay-pagamentos...
  • Plugin version: 1.5.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 15, 2016
  • Latest release: Nov 22, 2022
  • Number of updates: 82
  • Update frequency: every 27.7 days
  • Top authors: paypayacin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.57ms] Passed 4 tests

Server-side resources used by PayPay - Pagamentos Multibanco, Cartão de Crédito/Débito e MB WAY
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.32 ▼4.64
Dashboard /wp-admin3.36 ▲0.0146.39 ▼16.08
Posts /wp-admin/edit.php3.47 ▲0.1143.05 ▼0.99
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.62 ▼8.58
Media Library /wp-admin/upload.php3.28 ▲0.0536.67 ▲5.10

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 74 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
paypay_db_version
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for PayPay - Pagamentos Multibanco, Cartão de Crédito/Débito e MB WAY
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.24 ▼0.994.87 ▲3.0742.70 ▼0.53
Dashboard /wp-admin2,210 ▲255.83 ▲0.0296.64 ▼11.7640.32 ▼7.40
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0235.16 ▼1.6932.32 ▼5.49
Add New Post /wp-admin/post-new.php1,523 ▲423.35 ▲0.30639.11 ▲10.4862.96 ▼2.08
Media Library /wp-admin/upload.php1,389 ▲44.25 ▲0.0399.59 ▼2.1642.00 ▼3.58

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

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/paypay-pagamentos-multibanco-e-cartao-de-creditodebito/vendor/paypayue/paypay-soap-php/src/PayPayWebservice.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt might help

paypay-pagamentos-multibanco-e-cartao-de-creditodebito/woocommerce-paypay.php 85% from 13 tests

The main file in "PayPay - Pagamentos Multibanco, Cartão de Crédito/Débito e MB WAY" v. 1.5.3 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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("paypay-pagamentos-multibanco-e-cartao-de-creditodebito.php" instead of "woocommerce-paypay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,480 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP607841,2192,881
PO File211274269
Markdown1510254
JSON20076

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.90
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes52
▷ Abstract classes00.00%
▷ Concrete classes52100.00%
▷ Final classes1019.23%
Methods154
▷ Static methods2717.53%
▷ Public methods11775.97%
▷ Protected methods63.90%
▷ Private methods3120.13%
Functions23
▷ Named functions313.04%
▷ Anonymous functions2086.96%
Constants29
▷ Global constants13.45%
▷ Class constants2896.55%
▷ Public constants28100.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
No PNG files were detected