84% woo-payment-processing-payleap

Code Review | Woo Payments with PayLeap

WordPress plugin Woo Payments with PayLeap scored84%from 54 tests.

About plugin

  • Plugin page: woo-payment-proce...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6
  • WordPress version: 6.3.1
  • First release: Jan 28, 2016
  • Latest release: May 2, 2016
  • Number of updates: 12
  • Update frequency: every 17.4 days
  • Top authors: usbswiper (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /1,585 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by Woo Payments with PayLeap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.96 ▼0.17
Dashboard /wp-admin3.37 ▲0.0349.03 ▼11.94
Posts /wp-admin/edit.php3.42 ▲0.0745.71 ▲1.78
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.36 ▼21.19
Media Library /wp-admin/upload.php3.29 ▲0.0635.32 ▼0.26

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Payments with PayLeap
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼0.841.50 ▼0.1439.23 ▲1.09
Dashboard /wp-admin2,209 ▲174.86 ▼0.1399.32 ▼9.5839.63 ▼0.85
Posts /wp-admin/edit.php2,086 ▼01.99 ▼0.0435.13 ▼2.5332.48 ▼2.02
Add New Post /wp-admin/post-new.php1,514 ▼1417.71 ▼5.59643.40 ▲31.9157.69 ▲5.82
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0698.02 ▲0.9641.60 ▼4.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-payment-processing-payleap/gateway-payleap.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: payment, online payments, process credit cards, credit card processing, payment gateway...

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

This is the main PHP file of "Woo Payments with PayLeap" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-payment-processing-payleap.php" instead of "gateway-payleap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin297 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17474297

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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/cards.png2.78KB1.78KB▼ 36.10%