84% mobcard-woo-payment-gateway

Code Review | MobCard Woo Payment Gateway

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

About plugin

  • Plugin page: mobcard-woo-payme...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Dec 13, 2019
  • Number of updates: 29
  • Update frequency: every 52.2 days
  • Top authors: SantiagoInteractive (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /5,671 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by MobCard Woo Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.30 ▼2.00
Dashboard /wp-admin3.31 ▲0.0052.66 ▲0.27
Posts /wp-admin/edit.php3.36 ▲0.0050.56 ▼0.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.68 ▼15.48
Media Library /wp-admin/upload.php3.23 ▲0.0038.04 ▼2.11

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for MobCard Woo Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼0.851.92 ▼0.1938.68 ▼5.94
Dashboard /wp-admin2,206 ▲185.10 ▲0.22101.74 ▼3.4743.42 ▲1.51
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0337.89 ▼4.2236.20 ▼0.28
Add New Post /wp-admin/post-new.php1,533 ▲1423.54 ▲0.30644.38 ▼43.9051.13 ▼2.12
Media Library /wp-admin/upload.php1,382 ▼34.21 ▼0.01101.01 ▼3.7744.13 ▲1.83

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Mobilpay_Payment_Request_Abstract' not found in wp-content/plugins/mobcard-woo-payment-gateway/includes/request/class-mobilpay-card.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Backend: WooCommerce > Settings > Checkout), #2 (Frontend: Your website checkout page)
The official readme.txt might help

mobcard-woo-payment-gateway/mobcard-woo-payment-gateway.php 92% from 13 tests

This is the main PHP file of "MobCard Woo Payment Gateway" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected1,443 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9179951,385
PO File1232758

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity28.88
▷ Minimum class complexity12.00
▷ Maximum class complexity58.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods63
▷ Static methods57.94%
▷ Public methods5282.54%
▷ Protected methods1117.46%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants45
▷ Global constants00.00%
▷ Class constants45100.00%
▷ Public constants45100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/mobilpay.png4.89KB2.72KB▼ 44.41%