89% invoice-gateway-yeshinvoice

Code Review | Yesh Invoice Payment Gateway for WooCommerce

WordPress plugin Yesh Invoice Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: invoice-gateway-y...
  • Plugin version: 1.1.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 13, 2021
  • Latest release: Sep 16, 2023
  • Number of updates: 55
  • Update frequency: every 12.8 days
  • Top authors: yeshbemanager (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.46ms] Passed 4 tests

Analyzing server-side resources used by Yesh Invoice Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.68 ▼5.62
Dashboard /wp-admin3.38 ▲0.0753.22 ▲0.93
Posts /wp-admin/edit.php3.49 ▲0.1352.19 ▲1.78
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.99 ▼18.93
Media Library /wp-admin/upload.php3.30 ▲0.0738.21 ▲1.93

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Yesh Invoice Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.011.75 ▼0.1741.67 ▼5.55
Dashboard /wp-admin2,195 ▲185.57 ▼0.0893.88 ▼13.2442.01 ▼1.38
Posts /wp-admin/edit.php2,097 ▼02.02 ▼0.0035.10 ▼1.3236.19 ▲0.41
Add New Post /wp-admin/post-new.php1,528 ▼923.35 ▲5.22698.99 ▲78.0649.87 ▼7.49
Media Library /wp-admin/upload.php1,400 ▼34.16 ▲0.0395.70 ▼13.4443.40 ▼11.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
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
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: invoices, payment, yeshinvoice, invoice, woocommerce...

invoice-gateway-yeshinvoice/wc-yeshin.php 85% from 13 tests

The main PHP script in "Yesh Invoice Payment Gateway for WooCommerce" version 1.1.7 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("invoice-gateway-yeshinvoice.php" instead of "wc-yeshin.php")
  • Description: The description should be shorter than 140 characters (currently 195 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,175 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PO File5235204684
PHP325989463
JavaScript210016
CSS14012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity5.11
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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