84% sifalo-pay

Code Review | Sifalo Pay

WordPress plugin Sifalo Pay scored84%from 54 tests.

About plugin

  • Plugin page: sifalo-pay
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Apr 23, 2022
  • Latest release: Aug 12, 2023
  • Number of updates: 27
  • Update frequency: every 17.7 days
  • Top authors: sifalo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /579 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.06MB] [CPU: ▼2.07ms] Passed 4 tests

An overview of server-side resources used by Sifalo Pay
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.33 ▲1.27
Dashboard /wp-admin3.36 ▲0.0645.52 ▼5.58
Posts /wp-admin/edit.php3.47 ▲0.1248.99 ▼0.24
Add New Post /wp-admin/post-new.php5.94 ▲0.0691.88 ▼3.74
Media Library /wp-admin/upload.php3.28 ▲0.0637.34 ▲2.36

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sifalo Pay
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.77 ▲0.331.66 ▼0.0243.28 ▲2.43
Dashboard /wp-admin2,200 ▲125.90 ▲1.0199.72 ▼10.3441.05 ▼4.26
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0040.70 ▼3.8337.19 ▼3.53
Add New Post /wp-admin/post-new.php1,519 ▼1623.16 ▲0.05629.96 ▼34.4358.78 ▲6.78
Media Library /wp-admin/upload.php1,385 ▼04.23 ▲0.07105.46 ▲4.3146.88 ▲2.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sifalo-pay/public/partials/sifalo-pay-public-display.php
    • > /wp-content/plugins/sifalo-pay/admin/partials/sifalo-pay-admin-display.php

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Screenshots: These screenshots require images: #1 (Install & Activate SifaloPay), #2 (Activate payment gateway in woocommerce), #3 (Add configuration)
The official readme.txt is a good inspiration

sifalo-pay/sifalo-pay.php Passed 13 tests

The main PHP script in "Sifalo Pay" version 1.0.7 is automatically included on every request by WordPress
106 characters long description:
Accept eWallet Payments ( EVC, Zaad, Sahal, eDahab, Premier Wallet ...etc ) securely on your online store.

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
Good job! No executable or dangerous file extensions detected494 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13241548432
JavaScript3545644
CSS368818

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.67
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/logo.png135.56KB52.45KB▼ 61.31%
public/logo0.png46.32KB17.83KB▼ 61.51%