83% woo-payswitch-theteller-payment-gateway

Code Review | PaySwitch TheTeller WooCommerce Payment Gateway

WordPress plugin PaySwitch TheTeller WooCommerce Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: woo-payswitch-the...
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Sep 24, 2018
  • Latest release: Feb 17, 2021
  • Number of updates: 18
  • Update frequency: every 49.8 days
  • Top authors: realnapster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,192 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by PaySwitch TheTeller WooCommerce Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.48 ▼5.26
Dashboard /wp-admin3.31 ▲0.0045.04 ▼6.20
Posts /wp-admin/edit.php3.36 ▲0.0045.52 ▼1.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.91 ▼17.25
Media Library /wp-admin/upload.php3.23 ▲0.0034.90 ▲3.83

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by PaySwitch TheTeller WooCommerce Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.21 ▼1.171.92 ▲0.2037.15 ▼9.34
Dashboard /wp-admin2,206 ▲275.86 ▲0.05107.33 ▼8.8139.40 ▼7.16
Posts /wp-admin/edit.php2,089 ▲32.02 ▲0.0239.77 ▲3.2234.21 ▼1.41
Add New Post /wp-admin/post-new.php1,520 ▼223.02 ▼0.12658.40 ▲39.6653.27 ▲3.41
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0296.96 ▼0.2644.42 ▲2.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-payswitch-theteller-payment-gateway/theteller-woocommere-gateway.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Requires php: Version format is invalid
  • Tags: There are too many tags (27 tag instead of maximum 10)
You can look at the official readme.txt

woo-payswitch-theteller-payment-gateway/theteller-woocommere-gateway.php 92% from 13 tests

Analyzing the main PHP file in "PaySwitch TheTeller WooCommerce Payment Gateway" version 3.4
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-payswitch-theteller-payment-gateway.php" instead of "theteller-woocommere-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin572 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP128275572

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity69.00
▷ Minimum class complexity69.00
▷ Maximum class complexity69.00
Average method complexity6.67
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods325.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png9.51KB3.13KB▼ 67.11%