67% totalprocessing-card-payments

Code Review | Total processing card payments for WooCommerce

WordPress plugin Total processing card payments for WooCommerce scored67%from 54 tests.

About plugin

  • Plugin page: totalprocessing-c...
  • Plugin version: 5.3.11
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2021
  • Latest release: Jun 26, 2023
  • Number of updates: 85
  • Update frequency: every 10.1 days
  • Top authors: totalprocessing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /6,792 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.84ms] Passed 4 tests

This is a short check of server-side resources used by Total processing card payments for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.06 ▼7.07
Dashboard /wp-admin3.31 ▼0.0351.49 ▼15.99
Posts /wp-admin/edit.php3.36 ▲0.0151.65 ▲2.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.83 ▼4.38
Media Library /wp-admin/upload.php3.23 ▲0.0140.00 ▲0.08

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 67 new files
Database: 3 new tables, 9 new options
New tables
wp_tpcpv3_tnxtbl
wp_tpcpv3_cbktbl
wp_tpcpv3_cronjob_tbl
New WordPress options
tpcpv3_gateway_cardsv2_e2e
widget_recent-comments
db_upgraded
can_compress_scripts
tpcpv3_gateway_cardsv2_cbk
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
tpcpv3_gateway_cardsv2_iframe

Browser metrics Passed 4 tests

This is an overview of browser requirements for Total processing card payments for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲8514.47 ▲0.371.96 ▲0.1941.14 ▼1.78
Dashboard /wp-admin2,227 ▲304.84 ▼0.09114.94 ▼23.7544.20 ▼10.48
Posts /wp-admin/edit.php2,110 ▲102.00 ▼0.0537.90 ▼1.9639.03 ▲0.17
Add New Post /wp-admin/post-new.php1,551 ▲623.42 ▲0.36682.61 ▲31.5155.67 ▲5.81
Media Library /wp-admin/upload.php1,406 ▲94.23 ▼0.0397.05 ▼14.6344.79 ▼2.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables detected upon uninstall: 3 tables
    • wp_tpcpv3_tnxtbl
    • wp_tpcpv3_cronjob_tbl
    • wp_tpcpv3_cbktbl
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • tpcpv3_gateway_cardsv2_cbk
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/totalprocessing-card-payments/templates/pci-frame-external.php
    • > /wp-content/plugins/totalprocessing-card-payments/public/partials/totalprocessing-card-payments-and-gateway-woocommerce-public-display.php
    • > /wp-content/plugins/totalprocessing-card-payments/admin/partials/totalprocessing-card-payments-and-gateway-woocommerce-admin-display.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/totalprocessing-card-payments/includes/payment-gateway-faqs-array.php:26
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/totalprocessing-card-payments/admin/partials/admin-options.php:96
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/totalprocessing-card-payments/includes/payment-gateway-setting-fields.php:425
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/totalprocessing-card-payments/templates/pci-frame-templatev3.php:139

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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 require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

totalprocessing-card-payments/totalprocessing-card-payments-and-gateway-woocommerce.php 77% from 13 tests

Analyzing the main PHP file in "Total processing card payments for WooCommerce" version 5.3.11
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.2.0" instead of "5.6")
  • Main file name: Name the main plugin file the same as the plugin slug ("totalprocessing-card-payments.php" instead of "totalprocessing-card-payments-and-gateway-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin9,205 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP254377845,817
JavaScript121031732,911
SVG1295308
CSS4264169

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity51.73
▷ Minimum class complexity1.00
▷ Maximum class complexity392.00
Average method complexity4.72
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods151
▷ Static methods159.93%
▷ Public methods14294.04%
▷ Protected methods42.65%
▷ Private methods53.31%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants11
▷ Global constants327.27%
▷ Class constants872.73%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.28MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/TP-Logo-white.png12.43KB6.94KB▼ 44.14%
assets/img/tp-logo.png276.20KB94.45KB▼ 65.80%