83% woo-pelecard-gateway

Code Review | Woo Pelecard Gateway

WordPress plugin Woo Pelecard Gateway scored 83% from 54 tests.

About plugin

  • Plugin page: woo-pelecard-gateway
  • Plugin version: 1.4.22
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Nov 3, 2015
  • Latest release: Sep 18, 2023
  • Number of updates: 129
  • Update frequency: every 22.3 days
  • Top authors: idofri (76.74%)pelecard (18.6%)ramiy (6.2%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active / 10,478 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Woo Pelecard Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.39 ▼1.52
Dashboard /wp-admin3.31 ▲0.0048.26 ▼0.44
Posts /wp-admin/edit.php3.36 ▲0.0044.07 ▼1.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.16 ▼0.57
Media Library /wp-admin/upload.php3.23 ▲0.0033.19 ▲0.04

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Woo Pelecard Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.22 ▼1.371.74 ▼0.3343.72 ▼6.23
Dashboard /wp-admin2,203 ▲144.79 ▼0.18111.10 ▼7.6642.92 ▼3.89
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0336.69 ▼0.0832.41 ▼1.03
Add New Post /wp-admin/post-new.php1,514 ▼017.75 ▲0.38608.11 ▼35.1955.85 ▲5.26
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0395.71 ▲3.0340.33 ▼0.30

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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 everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Pelecardwc\\Invoices\\Base' not found in wp-content/plugins/woo-pelecard-gateway/includes/Invoices/Tamal.php:8
    • > PHP Fatal error
      Trait 'Pelecardwc\\Traits\\Singleton' not found in wp-content/plugins/woo-pelecard-gateway/includes/Order.php on line 8
    • > PHP Fatal error
      Trait 'Pelecardwc\\Traits\\Singleton' not found in wp-content/plugins/woo-pelecard-gateway/includes/Legacy.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Pelecardwc\\Invoices\\Base' not found in wp-content/plugins/woo-pelecard-gateway/includes/Invoices/ICount.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway_CC' not found in wp-content/plugins/woo-pelecard-gateway/includes/Gateway.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Data' not found in wp-content/plugins/woo-pelecard-gateway/includes/Transaction.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Pelecardwc\\Invoices\\Base' not found in wp-content/plugins/woo-pelecard-gateway/includes/Invoices/EZCount.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Session_Handler' not found in wp-content/plugins/woo-pelecard-gateway/includes/Session.php:10
    • > PHP Fatal error
      Trait 'Pelecardwc\\Traits\\Singleton' not found in wp-content/plugins/woo-pelecard-gateway/includes/Plugin.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: woo commerce, pelecard, gateway, subscriptions, payments...

woo-pelecard-gateway/woocommerce-pelecard-gateway.php 85% from 13 tests

The entry point to "Woo Pelecard Gateway" version 1.4.22 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-pelecard-gateway.php" instead of "woocommerce-pelecard-gateway.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,498 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP256653843,371
JavaScript413076
JSON20051

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 278)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity33.00
▷ Minimum class complexity1.00
▷ Maximum class complexity298.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity278.00
Code structure
Namespaces4
Interfaces0
Traits1
Classes16
▷ Abstract classes16.25%
▷ Concrete classes1593.75%
▷ Final classes00.00%
Methods209
▷ Static methods2311.00%
▷ Public methods19593.30%
▷ Protected methods10.48%
▷ Private methods136.22%
Functions9
▷ Named functions444.44%
▷ Anonymous functions555.56%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin