84% kashing

Code Review | Kashing Payments for WordPress

WordPress plugin Kashing Payments for WordPress scored 84% from 54 tests.

About plugin

  • Plugin page: kashing
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6.2
  • WordPress version: 6.3.1
  • First release: Feb 9, 2018
  • Latest release: Mar 5, 2021
  • Number of updates: 20
  • Update frequency: every 56.7 days
  • Top authors: kashingonline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 792 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.34MB] [CPU: ▲2.54ms] Passed 4 tests

This is a short check of server-side resources used by Kashing Payments for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3142.95 ▲0.75
Dashboard /wp-admin3.69 ▲0.3853.74 ▲7.76
Posts /wp-admin/edit.php3.73 ▲0.3857.65 ▲10.21
Add New Post /wp-admin/post-new.php6.23 ▲0.3490.22 ▼8.49
Media Library /wp-admin/upload.php3.55 ▲0.3243.53 ▲10.14
Add New Form /wp-admin/post-new.php?post_type=kashing3.5950.46
View Forms /wp-admin/edit.php?post_type=kashing3.5840.03
Settings /wp-admin/edit.php?post_type=kashing&page=kashing-settings3.5134.88

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Kashing Payments for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲21713.93 ▼0.668.74 ▲6.9241.87 ▼9.72
Dashboard /wp-admin2,244 ▲595.87 ▼0.1698.67 ▼0.8940.76 ▼3.03
Posts /wp-admin/edit.php2,132 ▲432.04 ▼0.0142.01 ▲1.2337.28 ▲1.25
Add New Post /wp-admin/post-new.php1,550 ▲1323.25 ▲4.91660.76 ▲13.7449.95 ▲0.41
Media Library /wp-admin/upload.php1,429 ▲384.17 ▼0.02101.16 ▲2.8643.04 ▼2.16
Add New Form /wp-admin/post-new.php?post_type=kashing1,5312.5250.8853.29
View Forms /wp-admin/edit.php?post_type=kashing1,1091.9831.9030.99
Settings /wp-admin/edit.php?post_type=kashing&page=kashing-settings8911.8424.9724.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • kashing
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(KASHING_PATHinc/shortcodes/kashing-form.php): failed to open stream: No such file or directory in wp-content/plugins/kashing/inc/class.kashing-shortcodes.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'Kashing_Payments' not found in wp-content/plugins/kashing/trunk/inc/class.kashing-settings.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/kashing/inc/helpers/currency/currency-misc/currency-list.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/kashing/inc/shortcodes/kashing-form.php:190
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kashing/inc/class.kashing-post-type.php:17
    • > PHP Fatal error
      require_once(): Failed opening required 'KASHING_PATHinc/class.kashing-metabox.php' (include_path='.:/usr/share/php') in wp-content/plugins/kashing/trunk/inc/class.kashing-metaboxes.php on line 3
    • > PHP Warning
      Use of undefined constant KASHING_PATH - assumed 'KASHING_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/kashing/trunk/inc/class.kashing-metaboxes.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'KASHING_PATHinc/class.kashing-metabox.php' (include_path='.:/usr/share/php') in wp-content/plugins/kashing/inc/class.kashing-metaboxes.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kashing/trunk/inc/class.kashing-api.php:61
    • > PHP Warning
      Use of undefined constant KASHING_PATH - assumed 'KASHING_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/kashing/inc/class.kashing-shortcodes.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: payment gateway, payment technology, smart payment, kashing, kashing payments

kashing/index.php 92% from 13 tests

The main file in "Kashing Payments for WordPress" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kashing.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,288 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP178005841,892
JavaScript26936257
CSS25115139

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.30
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity4.13
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods104
▷ Static methods00.00%
▷ Public methods104100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin