89% woo-yuansfer

Code Review | Pockyt - Accept Alternative Payments

WordPress plugin Pockyt - Accept Alternative Payments scored89%from 54 tests.

About plugin

  • Plugin page: woo-yuansfer
  • Plugin version: 3.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Aug 18, 2019
  • Latest release: Nov 9, 2022
  • Number of updates: 45
  • Update frequency: every 28.0 days
  • Top authors: yuansfer (93.33%)stefanmihajlovic (8.89%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,538 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.15ms] Passed 4 tests

An overview of server-side resources used by Pockyt - Accept Alternative Payments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.11 ▼2.26
Dashboard /wp-admin3.33 ▲0.0348.97 ▼0.86
Posts /wp-admin/edit.php3.38 ▲0.0250.26 ▼0.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.85 ▼4.68
Media Library /wp-admin/upload.php3.25 ▲0.0234.92 ▼0.81

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Pockyt - Accept Alternative Payments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲6413.24 ▼0.712.06 ▼0.0340.15 ▼0.61
Dashboard /wp-admin2,213 ▲255.81 ▲0.91107.62 ▲0.6242.98 ▼6.09
Posts /wp-admin/edit.php2,098 ▲91.99 ▼0.0240.35 ▲4.0935.86 ▲1.30
Add New Post /wp-admin/post-new.php1,552 ▲1618.29 ▼4.75631.02 ▼41.9357.90 ▼11.53
Media Library /wp-admin/upload.php1,398 ▲104.26 ▲0.0594.58 ▼12.0742.24 ▼0.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

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
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The settings panel used to configure the gateway.), #2 (Normal checkout with Yuansfer.), #3 (Option to save a card to your account.), #4 (Checking out with a saved card.), #5 (Using the Yuansfer checkout modal.)
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

woo-yuansfer/woocommerce-yuansfer.php 92% from 13 tests

The primary PHP file in "Pockyt - Accept Alternative Payments" version 3.0.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-yuansfer.php" instead of "woocommerce-yuansfer.php")

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
There were no executable files found in this plugin4,039 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP279591,8953,811
Markdown1520104
CSS33049
SVG50144
JavaScript26631

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity33.30
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods228
▷ Static methods4519.74%
▷ Public methods21594.30%
▷ Protected methods93.95%
▷ Private methods41.75%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants31
▷ Global constants722.58%
▷ Class constants2477.42%
▷ Public constants24100.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
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/creditcard.png1.61KB1.40KB▼ 12.82%
assets/images/wechatpay.png31.18KB7.70KB▼ 75.32%