89% wpyar-edd-saman-bank-gateway

Code Review | WpYar EDD Saman Bank Gateway

WordPress plugin WpYar EDD Saman Bank Gateway scored89%from 54 tests.

About plugin

  • Plugin page: wpyar-edd-saman-b...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Feb 4, 2017
  • Latest release: Mar 2, 2017
  • Number of updates: 7
  • Update frequency: every 3.6 days
  • Top authors: habibi313 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /6,623 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.29MB] [CPU: ▼19.99ms] Passed 4 tests

This is a short check of server-side resources used by WpYar EDD Saman Bank Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0232.27 ▼5.70
Dashboard /wp-admin3.36 ▲0.0147.86 ▼11.03
Posts /wp-admin/edit.php3.41 ▲0.0547.91 ▼2.37
Add New Post /wp-admin/post-new.php4.65 ▼1.2443.08 ▼56.38
Media Library /wp-admin/upload.php3.28 ▲0.0532.62 ▼6.85

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

WpYar EDD Saman Bank Gateway: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.64 ▼0.0139.71 ▼0.50
Dashboard /wp-admin2,195 ▲185.59 ▼0.0689.48 ▲5.5037.33 ▼7.56
Posts /wp-admin/edit.php2,103 ▼02.05 ▲0.0340.61 ▼5.1635.30 ▼2.21
Add New Post /wp-admin/post-new.php1,535 ▲923.14 ▼0.14641.55 ▼51.3748.03 ▼16.33
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.0992.60 ▼4.3539.73 ▼6.98

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wpyar-edd-saman-bank-gateway === )
Please take inspiration from this readme.txt

wpyar-edd-saman-bank-gateway/edd-saman-bank.php 85% from 13 tests

The main PHP file in "WpYar EDD Saman Bank Gateway" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpyar-edd-saman-bank-gateway.php" instead of "edd-saman-bank.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected6,491 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44322,4365,630
SVG100700
CSS111184
PO File1282977

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity93.43
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity9.68
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods149
▷ Static methods00.00%
▷ Public methods149100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
inc/template/images/shetab.png3.52KB1.90KB▼ 46.05%