84% woocommerce-gateway-paytpv

Code Review | Pasarela de pago para PayTpv

WordPress plugin Pasarela de pago para PayTpv scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-gatew...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Oct 2, 2013
  • Latest release: Sep 2, 2015
  • Number of updates: 16
  • Update frequency: every 43.8 days
  • Top authors: m1k3lm (93.75%)jrgarcia (12.5%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,143 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.01ms] Passed 4 tests

Server-side resources used by Pasarela de pago para PayTpv
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0837.27 ▼4.16
Dashboard /wp-admin3.39 ▲0.0847.26 ▼0.44
Posts /wp-admin/edit.php3.50 ▲0.1448.83 ▲0.52
Add New Post /wp-admin/post-new.php5.97 ▲0.0896.20 ▲2.78
Media Library /wp-admin/upload.php3.31 ▲0.0834.65 ▲0.04

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

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

Browser metrics Passed 4 tests

Pasarela de pago para PayTpv: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.73 ▲0.361.77 ▼0.3342.36 ▼5.73
Dashboard /wp-admin2,209 ▲215.90 ▲1.02109.36 ▼1.6443.33 ▲1.24
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0740.36 ▼2.3535.48 ▼2.51
Add New Post /wp-admin/post-new.php1,545 ▲1223.03 ▼0.33572.73 ▼149.3553.33 ▼0.79
Media Library /wp-admin/upload.php1,382 ▼34.23 ▼0.1297.57 ▼2.9543.59 ▲3.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-gateway-paytpv/gateway-paytpv.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-gateway-paytpv/lib/class.soapclient.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-gateway-paytpv/lib/class.soap_transport_http.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-gateway-paytpv/lib/class.soap_server.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-gateway-paytpv/lib/class.soap_val.php:17
    • > PHP Warning
      require_once(Mail/mimeDecode.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-gateway-paytpv/lib/nusoapmime.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-gateway-paytpv/lib/class.soap_fault.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-gateway-paytpv/lib/class.soap_parser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-gateway-paytpv/lib/class.wsdl.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/woocommerce-gateway-paytpv/lib/class.xmlschema.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: payment gateway, woocommerce

woocommerce-gateway-paytpv/gateway-paytpv.php 92% from 13 tests

The principal PHP file in "Pasarela de pago para PayTpv" v. 2.1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-gateway-paytpv.php" instead of "gateway-paytpv.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
No dangerous file extensions were detected11,684 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP149495,17311,573
PO File13138100
Markdown18011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity71.50
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity8.61
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods352
▷ Static methods20.57%
▷ Public methods35099.43%
▷ Protected methods00.00%
▷ Private methods20.57%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/cards.png2.11KB1.81KB▼ 14.01%