89% concordpay-for-woocommerce

Code Review | ConcordPay Payment Gateway for WooCommerce

WordPress plugin ConcordPay Payment Gateway for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: concordpay-for-wo...
  • Plugin version: 1.4.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2021
  • Latest release: Nov 21, 2022
  • Number of updates: 16
  • Update frequency: every 37.1 days
  • Top authors: mustpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 730 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.12MB] [CPU: ▼4.31ms] Passed 4 tests

An overview of server-side resources used by ConcordPay Payment Gateway for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.85 ▼1.94
Dashboard /wp-admin3.43 ▲0.1245.43 ▼9.88
Posts /wp-admin/edit.php3.54 ▲0.1846.43 ▼3.20
Add New Post /wp-admin/post-new.php6.01 ▲0.1297.02 ▼2.20
Media Library /wp-admin/upload.php3.35 ▲0.1237.59 ▲1.93

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by ConcordPay Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲6013.22 ▼1.091.82 ▼0.0947.71 ▲1.22
Dashboard /wp-admin2,226 ▲385.82 ▲0.94101.61 ▼16.9489.44 ▲42.43
Posts /wp-admin/edit.php2,109 ▲202.13 ▲0.0938.59 ▼0.5235.18 ▲0.60
Add New Post /wp-admin/post-new.php1,538 ▲1922.96 ▼0.18671.84 ▼28.9551.67 ▼14.09
Media Library /wp-admin/upload.php1,402 ▲144.18 ▼0.0394.83 ▼0.5468.54 ▲22.28

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #8 (Successful payment.) image required
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

concordpay-for-woocommerce/concordpay-for-woocommerce.php 92% from 13 tests

The principal PHP file in "ConcordPay Payment Gateway for WooCommerce" v. 1.4.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.5" instead of "6.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,404 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP2130338612
PO File2118138301
JavaScript2276227
CSS1230195
SVG10152
Markdown19017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity28.50
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods37
▷ Static methods38.11%
▷ Public methods2259.46%
▷ Protected methods924.32%
▷ Private methods616.22%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants15.56%
▷ Class constants1794.44%
▷ Public constants17100.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.10MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
settings.png98.35KB35.27KB▼ 64.14%