73% paytpv-for-woocommerce

Code Review | PAYCOMET for WooCommerce

WordPress plugin PAYCOMET for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: paytpv-for-woocom...
  • Plugin version: 5.30
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2015
  • Latest release: Nov 16, 2023
  • Number of updates: 164
  • Update frequency: every 17.7 days
  • Top authors: PayTPV (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /48,974 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.10MB] [CPU: ▼17.92ms] Passed 4 tests

An overview of server-side resources used by PAYCOMET for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1027.71 ▼14.23
Dashboard /wp-admin3.24 ▼0.0729.65 ▼19.49
Posts /wp-admin/edit.php3.31 ▼0.0533.96 ▼13.19
Add New Post /wp-admin/post-new.php5.56 ▼0.3372.80 ▼24.77
Media Library /wp-admin/upload.php3.26 ▲0.0328.81 ▼3.86

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 94 new files
Database: 1 new table, 7 new options
New tables
wp_paytpv_customer
New WordPress options
paytpv
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for PAYCOMET for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.02 ▼0.332.04 ▲0.2244.70 ▼0.45
Dashboard /wp-admin2,192 ▲155.53 ▼0.0191.54 ▼8.7138.87 ▼3.06
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0537.52 ▼1.1737.16 ▼1.19
Add New Post /wp-admin/post-new.php1,526 ▼023.04 ▼0.57616.03 ▼48.6252.97 ▼2.66
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.04100.17 ▼11.8243.75 ▼0.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_paytpv_customer
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • paytpv
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 34× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Paycomet_APM' not found in wp-content/plugins/paytpv-for-woocommerce/inc/paycomet-paysera.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Paycomet_APM' not found in wp-content/plugins/paytpv-for-woocommerce/inc/paycomet-mts.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/paytpv-for-woocommerce/inc/paycomet-apm.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/paytpv-for-woocommerce/inc/woocommerce-paytpv.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Paycomet_APM' not found in wp-content/plugins/paytpv-for-woocommerce/inc/paycomet-beeline.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Paycomet_APM' not found in wp-content/plugins/paytpv-for-woocommerce/inc/paycomet-multibanco.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Paycomet_APM' not found in wp-content/plugins/paytpv-for-woocommerce/inc/paycomet-trustly.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Paycomet_APM' not found in wp-content/plugins/paytpv-for-woocommerce/inc/paycomet-yandex.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/paytpv-for-woocommerce/gateway-paytpv.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/paytpv-for-woocommerce/template/myaccount/conditions.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

paytpv-for-woocommerce/gateway-paytpv.php 85% from 13 tests

The main PHP file in "PAYCOMET for WooCommerce" ver. 5.30 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("paytpv-for-woocommerce.php" instead of "gateway-paytpv.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
There were no executable files found in this plugin7,342 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
PHP378592913,970
JavaScript32674161,303
CSS365102792
SVG3000667
PO File1215268602
Markdown1608

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.13
▷ Minimum class complexity1.00
▷ Maximum class complexity279.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity81.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes00.00%
Methods156
▷ Static methods1610.26%
▷ Public methods15498.72%
▷ Protected methods00.00%
▷ Private methods21.28%
Functions15
▷ Named functions1386.67%
▷ Anonymous functions213.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/2100cancelar.png0.96KB0.87KB▼ 9.64%
images/cards.png2.11KB1.81KB▼ 14.01%
images/2100info.png0.87KB0.86KB▼ 1.79%
images/paycomet.png3.72KB2.38KB▼ 36.16%
images/2100Aceptard.png2.23KB1.73KB▼ 22.47%