90% payment-method-checkout-fee-for-woocommerce

Code Review | Payment Method Checkout Fee

WordPress plugin Payment Method Checkout Fee scored90%from 54 tests.

About plugin

  • Plugin page: payment-method-ch...
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Dec 21, 2019
  • Latest release: Jun 12, 2023
  • Number of updates: 10
  • Update frequency: every 126.9 days
  • Top authors: vipestudio (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /1,271 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Payment Method Checkout Fee
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.66 ▲1.91
Dashboard /wp-admin3.32 ▲0.0249.10 ▼5.93
Posts /wp-admin/edit.php3.37 ▲0.0143.78 ▼5.22
Add New Post /wp-admin/post-new.php5.91 ▲0.0181.50 ▼18.60
Media Library /wp-admin/upload.php3.25 ▲0.0134.64 ▲0.75

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Method Checkout Fee
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.101.66 ▼0.0544.75 ▲0.93
Dashboard /wp-admin2,206 ▲154.86 ▼0.19113.07 ▼2.8242.98 ▼3.43
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0132.95 ▼2.4534.51 ▼1.31
Add New Post /wp-admin/post-new.php1,514 ▼817.72 ▼5.35615.40 ▼54.5049.39 ▼4.75
Media Library /wp-admin/upload.php1,388 ▼34.26 ▲0.0496.81 ▼3.0941.52 ▼4.76

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: woocommerce, checkout fee

payment-method-checkout-fee-for-woocommerce/checkoutfee.php 92% from 13 tests

The main PHP file in "Payment Method Checkout Fee" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("payment-method-checkout-fee-for-woocommerce.php" instead of "checkoutfee.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin158 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22618144
CSS10014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/Wapuu-Vipe-Studio-Ltd.png32.87KB13.30KB▼ 59.54%