84% simpaisa-wallet-payment-services

Code Review | Simpaisa Wallet (Jazzcash & Easypaisa) Payment Services

WordPress plugin Simpaisa Wallet (Jazzcash & Easypaisa) Payment Services scored84%from 54 tests.

About plugin

  • Plugin page: simpaisa-wallet-p...
  • Plugin version: 2.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Apr 4, 2022
  • Latest release: Aug 24, 2023
  • Number of updates: 31
  • Update frequency: every 16.5 days
  • Top authors: maqsoodali (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /7,162 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.01MB] [CPU: ▼12.91ms] Passed 4 tests

This is a short check of server-side resources used by Simpaisa Wallet (Jazzcash & Easypaisa) Payment Services
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.26 ▲0.86
Dashboard /wp-admin3.31 ▼0.0446.24 ▼18.03
Posts /wp-admin/edit.php3.36 ▲0.0048.42 ▼3.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.58 ▼29.94
Media Library /wp-admin/upload.php3.23 ▲0.0038.85 ▼0.35

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simpaisa Wallet (Jazzcash & Easypaisa) Payment Services
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,438 ▼1,29712.41 ▼2.172.20 ▼0.6442.83 ▼5.89
Dashboard /wp-admin2,197 ▲95.88 ▼0.03111.88 ▲0.9358.22 ▲16.42
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0337.11 ▼4.1132.41 ▼2.85
Add New Post /wp-admin/post-new.php1,514 ▼017.55 ▼0.15647.16 ▼34.4334.24 ▼21.65
Media Library /wp-admin/upload.php1,385 ▼34.19 ▲0.0598.97 ▼18.9941.15 ▼7.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simpaisa-wallet-payment-services/simpaisa-wallet-payment-services.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: The official readme.txt might help

simpaisa-wallet-payment-services/simpaisa-wallet-payment-services.php Passed 13 tests

"Simpaisa Wallet (Jazzcash & Easypaisa) Payment Services" version 2.1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
52 characters long description:
Providing Easy To Integrate Digital Payment Services

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected797 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP211723487
CSS13513186
Markdown120077
JavaScript14347

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity30.00
▷ Minimum class complexity7.00
▷ Maximum class complexity53.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.25MB with 0.19MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/simpaisa-logo.png26.68KB3.43KB▼ 87.14%
assets/jazzcash-logo.png96.78KB28.60KB▼ 70.45%
assets/jazzcah-logo.png90.07KB29.93KB▼ 66.77%
assets/easypaisa-logo.png45.91KB12.80KB▼ 72.12%