89% bse-jcc-payment-gateway-redirect

Code Review | JCC Payment Gateway for Woocommerce

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

About plugin

  • Plugin page: bse-jcc-payment-g...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.14-5.4.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2019
  • Latest release: Nov 19, 2020
  • Number of updates: 29
  • Update frequency: every 20.8 days
  • Top authors: bseltd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,060 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by JCC Payment Gateway for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.85 ▼3.05
Dashboard /wp-admin3.31 ▲0.0043.68 ▼4.39
Posts /wp-admin/edit.php3.36 ▲0.0046.35 ▼2.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.73 ▼8.80
Media Library /wp-admin/upload.php3.23 ▲0.0034.57 ▼0.32

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for JCC Payment Gateway for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.141.65 ▼0.1743.27 ▼1.08
Dashboard /wp-admin2,206 ▲215.79 ▼0.0297.50 ▼7.7639.22 ▼1.52
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0439.38 ▼1.1334.80 ▼0.75
Add New Post /wp-admin/post-new.php1,537 ▼823.14 ▲4.86651.18 ▲28.8970.21 ▲8.84
Media Library /wp-admin/upload.php1,391 ▼04.22 ▲0.0199.09 ▼2.7544.66 ▼2.25

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: jcc cyprus, jcc, payment, payment gateway

bse-jcc-payment-gateway-redirect/jcc-payment-gateway-redirect.php 77% from 13 tests

The entry point to "JCC Payment Gateway for Woocommerce" version 1.0.7 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bse-jcc-payment-gateway-redirect.php" instead of "jcc-payment-gateway-redirect.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "2.6.14")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin574 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP469144568
JavaScript1006

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity18.33
▷ Minimum class complexity4.00
▷ Maximum class complexity46.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2696.30%
▷ Protected methods00.00%
▷ Private methods13.70%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected