73% remita-payment-gateway

Code Review | Remita Woocommerce Payment Plugin

WordPress plugin Remita Woocommerce Payment Plugin scored73%from 54 tests.

About plugin

  • Plugin page: remita-payment-ga...
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jul 7, 2015
  • Latest release: Aug 22, 2023
  • Number of updates: 21
  • Update frequency: every 141.5 days
  • Top authors: RemitaNet (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /7,128 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.66ms] Passed 4 tests

Server-side resources used by Remita Woocommerce Payment Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.92 ▲4.21
Dashboard /wp-admin3.36 ▲0.0647.96 ▼4.07
Posts /wp-admin/edit.php3.41 ▲0.0650.42 ▲2.50
Add New Post /wp-admin/post-new.php5.94 ▲0.0684.09 ▼6.73
Media Library /wp-admin/upload.php3.29 ▲0.0638.05 ▲1.68

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: 1 new table, 7 new options
New tables
wp_paymentgatewaytranx
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
jal_db_version

Browser metrics Passed 4 tests

Remita Woocommerce Payment Plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.98 ▲0.4744.63 ▲5.59
Dashboard /wp-admin2,195 ▲275.58 ▼0.0196.35 ▲8.1741.43 ▼1.28
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0734.24 ▼12.5836.49 ▼2.99
Add New Post /wp-admin/post-new.php1,526 ▼023.05 ▲0.05660.71 ▼4.5956.49 ▲2.99
Media Library /wp-admin/upload.php1,394 ▼64.16 ▼0.0897.62 ▼12.3643.36 ▼0.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_paymentgatewaytranx
  • The uninstall procedure has failed, leaving 7 options in the database
    • jal_db_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/remita-payment-gateway/woocommerce_remita.php:16

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 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #8, #9 in remita-payment-gateway/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires php: Invalid version format
You can look at the official readme.txt

remita-payment-gateway/woocommerce_remita.php 92% from 13 tests

The main PHP file in "Remita Woocommerce Payment Plugin" ver. 2.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: It is recommended to name the main PHP file as the plugin slug ("remita-payment-gateway.php" instead of "woocommerce_remita.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin370 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP113225319
JavaScript119051

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.08MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/remita.png58.35KB3.16KB▼ 94.59%
assets/images/remita-payment-options.png24.68KB5.68KB▼ 76.98%