89% woo-xendit-virtual-accounts

Code Review | Woocommerce - Xendit

WordPress plugin Woocommerce - Xendit scored89%from 54 tests.

About plugin

Code review

54 tests

User reviews

8 reviews

Install metrics

4,000+ active /92,311 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼13.34ms] Passed 4 tests

An overview of server-side resources used by Woocommerce - Xendit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1135.02 ▼5.22
Dashboard /wp-admin3.42 ▲0.0744.73 ▼25.23
Posts /wp-admin/edit.php3.53 ▲0.1746.25 ▼0.95
Add New Post /wp-admin/post-new.php6.00 ▲0.1181.25 ▼21.96
Media Library /wp-admin/upload.php3.34 ▲0.1133.54 ▲0.21

Server storage [IO: ▲1.08MB] [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: 159 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce - Xendit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.29 ▼0.061.76 ▼0.0036.62 ▼7.51
Dashboard /wp-admin2,195 ▲205.61 ▲0.0393.45 ▼18.9038.59 ▼10.19
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0138.63 ▼1.0634.98 ▼2.47
Add New Post /wp-admin/post-new.php1,534 ▲825.17 ▲2.01616.39 ▼67.9968.04 ▲14.67
Media Library /wp-admin/upload.php1,403 ▼04.16 ▼0.0694.61 ▼3.2144.36 ▲4.10

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === woo-xendit-virtual-accounts === )
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
  • Donate link: Please fix this invalid URI: "#"
You can take inspiration from this readme.txt

woo-xendit-virtual-accounts/woocommerce-xendit-pg.php 92% from 13 tests

The main PHP script in "Woocommerce - Xendit" version 4.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-xendit-virtual-accounts.php" instead of "woocommerce-xendit-pg.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 plugin8,872 lines of code in 150 files:
LanguageFilesBlank linesComment linesLines of code
PHP951,6081,3457,999
JavaScript37851328
YAML4030212
PO File1620138
SVG440087
CSS110084
Markdown18016
JSON1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.94
▷ Minimum class complexity2.00
▷ Maximum class complexity199.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes53
▷ Abstract classes00.00%
▷ Concrete classes53100.00%
▷ Final classes11.89%
Methods278
▷ Static methods3211.51%
▷ Public methods24989.57%
▷ Protected methods207.19%
▷ Private methods93.24%
Functions26
▷ Named functions1869.23%
▷ Anonymous functions830.77%
Constants141
▷ Global constants32.13%
▷ Class constants13897.87%
▷ Public constants138100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/xendit.png0.97KB0.72KB▼ 25.20%
assets/images/cc.png25.49KB10.54KB▼ 58.66%