84% xeppt-card-payment

Code Review | XEPPT Card Payment Plugin

WordPress plugin XEPPT Card Payment Plugin scored84%from 54 tests.

About plugin

  • Plugin page: xeppt-card-payment
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: Aug 9, 2022
  • Latest release: Jan 16, 2023
  • Number of updates: 10
  • Update frequency: every 16.4 days
  • Top authors: xepptwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /157 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by XEPPT Card Payment Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.87 ▼2.36
Dashboard /wp-admin3.31 ▲0.0146.28 ▼2.47
Posts /wp-admin/edit.php3.36 ▲0.0148.37 ▲2.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.60 ▼5.09
Media Library /wp-admin/upload.php3.24 ▲0.0137.07 ▲4.77

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for XEPPT Card Payment Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.31 ▼1.351.88 ▼0.0139.47 ▼4.88
Dashboard /wp-admin2,206 ▲184.86 ▼0.02108.76 ▼10.4240.53 ▼4.89
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0342.98 ▲8.0233.89 ▼0.35
Add New Post /wp-admin/post-new.php1,528 ▼518.21 ▼4.71608.06 ▼26.0748.84 ▼8.09
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0793.20 ▼9.0442.69 ▲0.44

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/xeppt-card-payment/includes/xeppt-checkout-description-fields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/xeppt-card-payment/includes/xeppt-error-logs.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/xeppt-card-payment/includes/class-wc-payment-gateway-xeppt.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: xeppt plugin, xeppt payment

xeppt-card-payment/xeppt-card-payment-plugin.php 92% from 13 tests

The principal PHP file in "XEPPT Card Payment Plugin" v. 2.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("xeppt-card-payment.php" instead of "xeppt-card-payment-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin779 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4108130556
JavaScript31016221
CSS20102

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods19.09%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected