90% fr-custom-payment-gateway-icon-for-woocommerce

Code Review | Fr Custom Payment Gateway Icon for WooCommerce

WordPress plugin Fr Custom Payment Gateway Icon for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: fr-custom-payment...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 25, 2017
  • Latest release: Jul 23, 2023
  • Number of updates: 29
  • Update frequency: every 75.6 days
  • Top authors: fahrirusliyadi (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

4,000+ active /17,379 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.98ms] Passed 4 tests

An overview of server-side resources used by Fr Custom Payment Gateway Icon for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.42 ▲2.08
Dashboard /wp-admin3.36 ▲0.0152.77 ▼11.93
Posts /wp-admin/edit.php3.47 ▲0.1152.61 ▼0.32
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.56 ▲1.27
Media Library /wp-admin/upload.php3.28 ▲0.0535.65 ▼0.94

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Fr Custom Payment Gateway Icon for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.21 ▼0.391.70 ▼0.1744.99 ▲3.13
Dashboard /wp-admin2,195 ▲155.64 ▼0.0495.67 ▲1.3842.22 ▼2.84
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0035.70 ▼5.0233.03 ▼2.20
Add New Post /wp-admin/post-new.php1,528 ▲223.24 ▲0.31626.63 ▼51.4858.09 ▼3.40
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.1099.87 ▼0.4140.64 ▼1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • 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)
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
The SRP test was a success

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === fr-custom-payment-gateway-icon-for-woocommerce === )
Please take inspiration from this readme.txt

fr-custom-payment-gateway-icon-for-woocommerce/fr-custom-payment-gateway-icon-for-woocommerce.php Passed 13 tests

The principal PHP file in "Fr Custom Payment Gateway Icon for WooCommerce" v. 1.1.2 is loaded by WordPress automatically on each request
81 characters long description:
Add or change payment gateway icons that appear on the WooCommerce checkout page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin190 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP898433190

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1773.91%
▷ Protected methods00.00%
▷ Private methods626.09%
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
PNG images were not found in this plugin