89% credit-card-payments-for-woocommerce-with-cybersource

Code Review | Credit Card Payments for Woocommerce with CyberSource

WordPress plugin Credit Card Payments for Woocommerce with CyberSource scored89%from 54 tests.

About plugin

  • Plugin page: credit-card-payme...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.1.0
  • WordPress version: 6.3.1
  • First release: Dec 5, 2018
  • Latest release: Feb 27, 2019
  • Number of updates: 9
  • Update frequency: every 9.4 days
  • Top authors: manidev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,729 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

A check of server-side resources used by Credit Card Payments for Woocommerce with CyberSource
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.11 ▼0.52
Dashboard /wp-admin3.31 ▼0.0348.90 ▼13.55
Posts /wp-admin/edit.php3.37 ▲0.0147.37 ▼7.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.90 ▼23.22
Media Library /wp-admin/upload.php3.24 ▲0.0134.40 ▲1.91

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Credit Card Payments for Woocommerce with CyberSource
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.081.61 ▲0.0137.60 ▼5.55
Dashboard /wp-admin2,198 ▲235.59 ▼0.1281.70 ▼16.2636.80 ▼7.02
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0241.06 ▲0.9535.04 ▼2.19
Add New Post /wp-admin/post-new.php1,528 ▼323.13 ▲0.02663.53 ▲13.3855.27 ▲3.38
Media Library /wp-admin/upload.php1,394 ▼94.24 ▼0.0297.94 ▲3.8042.04 ▲0.75

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: woocommerce, cybersource, payments, pci

credit-card-payments-for-woocommerce-with-cybersource/woocommerce-cybersource-cc.php 85% from 13 tests

The primary PHP file in "Credit Card Payments for Woocommerce with CyberSource" version 1.0.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("credit-card-payments-for-woocommerce-with-cybersource.php" instead of "woocommerce-cybersource-cc.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.5.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected862 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4212194805
JavaScript1112057

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity28.67
▷ Minimum class complexity7.00
▷ Maximum class complexity62.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods12.70%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin