90% payment-gateways-by-shipping-for-woocommerce

Code Review | Payment Gateways by Shipping for WooCommerce

WordPress plugin Payment Gateways by Shipping for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: payment-gateways-...
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: May 16, 2018
  • Latest release: Sep 26, 2023
  • Number of updates: 22
  • Update frequency: every 89.1 days
  • Top authors: algoritmika (86.36%)wpcodefactory (18.18%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /5,704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Payment Gateways by Shipping for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.04 ▲2.36
Dashboard /wp-admin3.32 ▲0.0249.99 ▼3.88
Posts /wp-admin/edit.php3.37 ▲0.0250.72 ▼0.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.83 ▼0.23
Media Library /wp-admin/upload.php3.24 ▲0.0138.49 ▲0.97

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Payment Gateways by Shipping for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.111.76 ▼0.6147.34 ▲3.81
Dashboard /wp-admin2,195 ▲185.64 ▼0.0994.02 ▲4.4342.85 ▼6.04
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0441.15 ▼2.1735.59 ▼5.46
Add New Post /wp-admin/post-new.php1,526 ▼517.53 ▼5.51645.26 ▼31.1351.38 ▼10.24
Media Library /wp-admin/upload.php1,403 ▲34.24 ▲0.06100.14 ▼7.4844.04 ▼4.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
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 a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 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
5 plugin tags: payment gateway, woocommerce, woo commerce, payment gateways, shipping

payment-gateways-by-shipping-for-woocommerce/payment-gateways-by-shipping-for-woocommerce.php Passed 13 tests

The entry point to "Payment Gateways by Shipping for WooCommerce" version 1.4.4 is a PHP file that has certain tags in its header comment area
67 characters long description:
Set "enable for shipping methods" for WooCommerce payment gateways.

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
Good job! No executable or dangerous file extensions detected441 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP686290441

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity12.80
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods28
▷ Static methods13.57%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin