90% valuepay-for-woocommerce

Code Review | ValuePay for WooCommerce

WordPress plugin ValuePay for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: valuepay-for-wooc...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Mar 29, 2022
  • Latest release: May 13, 2022
  • Number of updates: 9
  • Update frequency: every 5.7 days
  • Top authors: valuepaymy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /703 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.98ms] Passed 4 tests

A check of server-side resources used by ValuePay for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.77 ▲3.13
Dashboard /wp-admin3.37 ▲0.0350.69 ▼12.02
Posts /wp-admin/edit.php3.48 ▲0.1350.76 ▼4.42
Add New Post /wp-admin/post-new.php5.95 ▲0.0696.13 ▼12.62
Media Library /wp-admin/upload.php3.29 ▲0.0638.01 ▲1.14

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for ValuePay for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.19 ▼0.361.64 ▼0.0638.76 ▼3.81
Dashboard /wp-admin2,200 ▲285.56 ▼0.1688.24 ▼23.6639.76 ▼4.37
Posts /wp-admin/edit.php2,105 ▲82.02 ▼0.0139.98 ▼0.2737.25 ▲2.04
Add New Post /wp-admin/post-new.php1,536 ▲923.34 ▼0.02595.45 ▼67.7272.74 ▲1.73
Media Library /wp-admin/upload.php1,402 ▲114.26 ▲0.08112.96 ▲9.5747.62 ▲0.43

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

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)
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

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

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
3 plugin tags: woocommerce, valuepay, payment

valuepay-for-woocommerce/valuepay-wc.php 92% from 13 tests

The main file in "ValuePay for WooCommerce" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("valuepay-for-woocommerce.php" instead of "valuepay-wc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected757 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP1027987757

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.83
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods2248.89%
▷ Protected methods36.67%
▷ Private methods2044.44%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/pay-with-valuepay.png22.45KB7.44KB▼ 66.84%