84% woo-paymaya-payment-gateway

Code Review | Woo PayMaya Payment Gateway

WordPress plugin Woo PayMaya Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woo-paymaya-payme...
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 16, 2017
  • Latest release: Aug 17, 2019
  • Number of updates: 13
  • Update frequency: every 56.2 days
  • Top authors: ryanitsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,183 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
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.33ms] Passed 4 tests

An overview of server-side resources used by Woo PayMaya Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.95 ▼8.01
Dashboard /wp-admin3.31 ▼0.0345.15 ▼19.76
Posts /wp-admin/edit.php3.36 ▲0.0147.67 ▲1.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.74 ▼14.16
Media Library /wp-admin/upload.php3.23 ▲0.0133.94 ▼3.39

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Woo PayMaya Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.101.61 ▼0.1040.96 ▼4.32
Dashboard /wp-admin2,206 ▲184.86 ▼1.00100.78 ▼5.7437.88 ▼7.17
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0739.87 ▲3.1636.11 ▲4.14
Add New Post /wp-admin/post-new.php1,514 ▼517.49 ▼5.63664.36 ▲4.7266.30 ▲10.90
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.0197.13 ▼16.7842.45 ▼5.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-paymaya-payment-gateway/wc-paymaya.php:15

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: payment gateway, woocommerce, credit card, payment tokenization, paymaya

woo-paymaya-payment-gateway/wc-paymaya.php 85% from 13 tests

This is the main PHP file of "Woo PayMaya Payment Gateway" version 1.6.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-paymaya-payment-gateway.php" instead of "wc-paymaya.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,197 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23802241,056
JavaScript16519141

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity125.00
▷ Minimum class complexity125.00
▷ Maximum class complexity125.00
Average method complexity5.43
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods517.86%
▷ Public methods2796.43%
▷ Protected methods13.57%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-1.png152.56KB60.47KB▼ 60.36%