84% wappoint-payment-gateway

Code Review | WAPPoint WooCommerce

WordPress plugin WAPPoint WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wappoint-payment-...
  • Plugin version: 2.5.23
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 11, 2022
  • Latest release: Nov 2, 2022
  • Number of updates: 20
  • Update frequency: every 10.4 days
  • Top authors: leighg (95%)rslabbert94 (10%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /707 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.00MB] [CPU: ▼2.55ms] Passed 4 tests

Analyzing server-side resources used by WAPPoint WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.07 ▲0.44
Dashboard /wp-admin3.31 ▼0.0351.26 ▼7.63
Posts /wp-admin/edit.php3.36 ▲0.0144.19 ▲1.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.93 ▼3.84
Media Library /wp-admin/upload.php3.24 ▲0.0133.43 ▲0.82

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WAPPoint WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.191.75 ▼0.0642.15 ▼1.30
Dashboard /wp-admin2,209 ▲245.85 ▲0.00103.44 ▼13.3040.64 ▼3.14
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0235.05 ▼1.5630.82 ▼3.08
Add New Post /wp-admin/post-new.php1,514 ▼1917.44 ▼6.08658.38 ▼23.5355.07 ▼9.24
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0296.25 ▼6.9343.57 ▼0.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wappoint-payment-gateway/includes/class-wc-gateway-wappoint.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: instant eft, debit order, reconcilliation, paypal, payments...

wappoint-payment-gateway/woo_wappoint_gateway.php 92% from 13 tests

The primary PHP file in "WAPPoint WooCommerce" version 2.5.23 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wappoint-payment-gateway.php" instead of "woo_wappoint_gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected282 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24067252
Markdown18030

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
logo.png9.46KB3.19KB▼ 66.25%