83% easypayway-is-a-bangladeshi-payment-gateway-with-the-woocommerce-plugin

Code Review | WooCommerce EasyPayWay A Bangladeshi Payment Gateway

WordPress plugin WooCommerce EasyPayWay A Bangladeshi Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: easypayway-is-a-b...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Jun 29, 2013
  • Latest release: Jun 29, 2013
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: redwans (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

A check of server-side resources used by WooCommerce EasyPayWay A Bangladeshi Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.30 ▼2.61
Dashboard /wp-admin3.36 ▲0.0248.68 ▼13.20
Posts /wp-admin/edit.php3.41 ▲0.0550.87 ▲1.00
Add New Post /wp-admin/post-new.php5.94 ▲0.0695.65 ▼8.06
Media Library /wp-admin/upload.php3.28 ▲0.0540.29 ▼3.74

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce EasyPayWay A Bangladeshi Payment Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4413.25 ▼1.134.81 ▲2.5442.28 ▲2.23
Dashboard /wp-admin2,215 ▲125.84 ▲0.96102.16 ▼5.5738.87 ▼2.45
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0439.70 ▲2.1938.32 ▲2.57
Add New Post /wp-admin/post-new.php1,554 ▲918.48 ▼4.87661.14 ▼1.3855.80 ▼0.42
Media Library /wp-admin/upload.php1,400 ▼04.24 ▼0.12112.36 ▼7.6945.93 ▼3.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easypayway-is-a-bangladeshi-payment-gateway-with-the-woocommerce-plugin/index.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (WooCommerce payment gateway setting page), #2 (EasyPayWay setting page), #3 (Success message), #4 (Info message if the payment for this transaction has been made by an American Express Card), #5 (Transaction declined Message), #6 (EasyPayWay Payment gateway option at the checkout page)
  • Plugin Name: Please specify the plugin name on the first line ( === easypayway-is-a-bangladeshi-payment-gateway-with-the-woocommerce-plugin === )
Please take inspiration from this readme.txt

easypayway-is-a-bangladeshi-payment-gateway-with-the-woocommerce-plugin/index.php 92% from 13 tests

The principal PHP file in "WooCommerce EasyPayWay A Bangladeshi Payment Gateway" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("easypayway-is-a-bangladeshi-payment-gateway-with-the-woocommerce-plugin.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin286 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15778286

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods964.29%
▷ Protected methods00.00%
▷ Private methods535.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.20MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png20.21KB8.68KB▼ 57.07%
screenshot-1.png29.60KB15.40KB▼ 47.98%
screenshot-2.png81.66KB29.61KB▼ 63.74%
screenshot-5.png18.49KB7.70KB▼ 58.34%
screenshot-3.png19.43KB8.43KB▼ 56.60%