90% simple-payoneer-offsite-gateway-for-woocommerce

Code Review | Simple Payoneer Offsite Gateway for WooCommerce

WordPress plugin Simple Payoneer Offsite Gateway for WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: simple-payoneer-o...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Jun 25, 2020
  • Latest release: Jul 7, 2020
  • Number of updates: 3
  • Update frequency: every 4.3 days
  • Top authors: Rynald0s (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 879 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.03MB] [CPU: ▼3.69ms] Passed 4 tests

Server-side resources used by Simple Payoneer Offsite Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.79 ▲3.96
Dashboard /wp-admin3.34 ▲0.0444.94 ▼2.61
Posts /wp-admin/edit.php3.39 ▲0.0345.11 ▼5.63
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.02 ▼10.49
Media Library /wp-admin/upload.php3.26 ▲0.0344.35 ▲9.67

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Simple Payoneer Offsite Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.201.75 ▲0.2139.10 ▼1.49
Dashboard /wp-admin2,209 ▲214.82 ▼1.09105.32 ▼26.3740.99 ▼13.04
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0335.19 ▼6.9834.45 ▼4.26
Add New Post /wp-admin/post-new.php1,534 ▼823.29 ▲4.42601.99 ▼8.5153.13 ▲8.31
Media Library /wp-admin/upload.php1,391 ▲64.22 ▲0.00104.11 ▲8.1545.01 ▲3.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • 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
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: payoneer gateway for woocommerce, payoneer gateway, woocommerce payoneer, payoneer for woocommerce, payoneer

simple-payoneer-offsite-gateway-for-woocommerce/wc-simple-payoneer-gateway.php 92% from 13 tests

The main PHP script in "Simple Payoneer Offsite Gateway for WooCommerce" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-payoneer-offsite-gateway-for-woocommerce.php" instead of "wc-simple-payoneer-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin180 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16845180

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png6.01KB4.10KB▼ 31.77%