89% payment-gateway-icons-for-woocommerce

Code Review | Custom Payment Gateway Icons

WordPress plugin Custom Payment Gateway Icons scored89%from 54 tests.

About plugin

  • Plugin page: payment-gateway-i...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Sep 23, 2022
  • Latest release: Aug 13, 2023
  • Number of updates: 28
  • Update frequency: every 11.6 days
  • Top authors: nas9286 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /1,293 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.08ms] Passed 4 tests

Analyzing server-side resources used by Custom Payment Gateway Icons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.42 ▼2.10
Dashboard /wp-admin3.34 ▲0.0044.68 ▼17.44
Posts /wp-admin/edit.php3.46 ▲0.1044.55 ▼3.75
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.26 ▼17.02
Media Library /wp-admin/upload.php3.27 ▲0.0434.67 ▼0.59

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Payment Gateway Icons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.28 ▲0.001.51 ▼0.4441.09 ▲1.56
Dashboard /wp-admin2,192 ▲115.58 ▼0.1389.69 ▼6.0842.24 ▲0.27
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0241.27 ▲7.0436.11 ▲1.90
Add New Post /wp-admin/post-new.php1,526 ▼323.87 ▲0.62590.54 ▼66.2049.98 ▲1.06
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.04101.22 ▼7.5743.20 ▼3.87

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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
Please fix the following attributes:
  • Screenshots: Screenshot #2 (This is plugin's logo) image not found
The official readme.txt might help

payment-gateway-icons-for-woocommerce/payment_gateway_icon_for_wooCommerce.php 77% from 13 tests

The main PHP file in "Custom Payment Gateway Icons" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this 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 ("payment-gateway-icons-for-woocommerce.php" instead of "payment_gateway_icon_for_wooCommerce.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.4" instead of "5.8")
  • Description: The description should be shorter than 140 characters (currently 191 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin159 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP678362159

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.25
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1578.95%
▷ Protected methods00.00%
▷ Private methods421.05%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin