73% cc-payment-gateway

Code Review | CC Payment Gateway

WordPress plugin CC Payment Gateway scored 73% from 54 tests.

About plugin

  • Plugin page: cc-payment-gateway
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Aug 10, 2018
  • Latest release: Aug 13, 2018
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: teknepay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,407 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲1.46ms] Passed 4 tests

This is a short check of server-side resources used by CC Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.72 ▲0.94
Dashboard /wp-admin3.33 ▲0.0249.32 ▼0.44
Posts /wp-admin/edit.php3.44 ▲0.0851.17 ▲5.89
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.72 ▼0.56
Media Library /wp-admin/upload.php3.25 ▲0.0240.58 ▲6.58

Server storage [IO: ▲0.20MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for CC Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17614.05 ▼0.385.75 ▲3.6345.03 ▼8.63
Dashboard /wp-admin2,220 ▲324.83 ▼1.03110.98 ▼15.1940.40 ▼16.77
Posts /wp-admin/edit.php2,105 ▲162.00 ▼0.0543.64 ▲4.1641.32 ▲4.41
Add New Post /wp-admin/post-new.php1,528 ▲1422.95 ▲5.42681.24 ▲21.4061.88 ▲8.58
Media Library /wp-admin/upload.php1,402 ▲144.22 ▼0.03122.97 ▼0.4152.97 ▼4.07

Uninstaller [IO: ▲0.20MB] [DB: ▲0.07MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall correctly, leaving 31 files (0.20MB) in the plugin directory
    • (new file) languages/woo-tkp-cc-gateway.pot
    • (new file) assets/public/js/woo-tkp-cc-gateway-public.js
    • (new file) .gitignore
    • (new file) assets/public/css/woo-tkp-cc-gateway-public.css
    • (new file) assets/admin/js/woo-tkp-cc-gateway-admin.js
    • (new file) assets/admin/css/woo-tkp-cc-gateway-admin.css
    • (new file) index.php
    • (new file) LICENSE.txt
    • (new file) README.txt
    • (new file) composer.json
    • ...
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/cc-payment-gateway/src/admin/partials/woo-tkp-cc-gateway-admin-display.php
    • > /wp-content/plugins/cc-payment-gateway/src/front/partials/woo-tkp-cc-gateway-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 83% 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
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === cc-payment-gateway === )
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

cc-payment-gateway/woo-tkp-cc-gateway.php 77% from 13 tests

"CC Payment Gateway" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 181 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cc-payment-gateway.php" instead of "woo-tkp-cc-gateway.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,057 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity6.88
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
▷ Static methods2228.57%
▷ Public methods7192.21%
▷ Protected methods00.00%
▷ Private methods67.79%
▷ Named functions583.33%
▷ Anonymous functions116.67%
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected