83% jcc-payment-gateway-for-wc

Code Review | JCC Payment Gateway for Woocommerce

WordPress plugin JCC Payment Gateway for Woocommerce scored 83% from 54 tests.

About plugin

  • Plugin page: jcc-payment-gatew...
  • Plugin version: 1.3.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Jul 7, 2020
  • Latest release: Mar 1, 2023
  • Number of updates: 48
  • Update frequency: every 20.3 days
  • Top authors: jccpaymentsystems (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 4,096 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.78ms] Passed 4 tests

This is a short check of server-side resources used by JCC Payment Gateway for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.47 ▲2.03
Dashboard /wp-admin3.31 ▲0.0144.00 ▼7.27
Posts /wp-admin/edit.php3.36 ▲0.0146.70 ▲2.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.43 ▼16.38
Media Library /wp-admin/upload.php3.24 ▲0.0134.83 ▲3.96

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by JCC Payment Gateway for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11114.75 ▲0.371.96 ▲0.0840.31 ▲1.31
Dashboard /wp-admin2,213 ▲285.83 ▼0.03105.32 ▼13.6940.02 ▼12.26
Posts /wp-admin/edit.php2,102 ▲131.98 ▼0.0639.99 ▲5.3238.70 ▲2.35
Add New Post /wp-admin/post-new.php1,422 ▼9822.32 ▼0.94547.24 ▼59.3243.19 ▼5.62
Media Library /wp-admin/upload.php1,392 ▲104.18 ▲0.0097.53 ▼1.5639.47 ▼2.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/jcc-payment-gateway-for-wc/includes/class-wc-jcc-payment-gateway.php:11

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 88% 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 require attention:
  • Screenshots: Add a description for screenshot #5 in jcc-payment-gateway-for-wc/assets to your readme.txt
  • Screenshots: Screenshot #1 (Section is used by Administrators to select Test or Production configuration.If Test Mode is enabled you can only use Test Credentials and if it is diasbled you can only use the Production Credentials.) image not found
The official readme.txt is a good inspiration

jcc-payment-gateway-for-wc/class-wc-jcc-plugin.php 92% from 13 tests

Analyzing the main PHP file in "JCC Payment Gateway for Woocommerce" version 1.3.6
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("jcc-payment-gateway-for-wc.php" instead of "class-wc-jcc-plugin.php")

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
Good job! No executable or dangerous file extensions detected1,335 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3215971,335

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity41.33
▷ Minimum class complexity2.00
▷ Maximum class complexity62.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods63
▷ Static methods00.00%
▷ Public methods5180.95%
▷ Protected methods00.00%
▷ Private methods1219.05%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.43MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/icon-256x256.png37.61KB0.00KB▼ 100.00%
(invalid) assets/img/icon-256x256.png37.61KB0.00KB▼ 100.00%
assets/screenshot-3.png146.43KB53.11KB▼ 63.73%
assets/screenshot-2.png37.96KB12.31KB▼ 67.56%
assets/img/screenshot-3.png146.43KB53.11KB▼ 63.73%