89% zibal-payment-learnpress

Code Review | Zibal Payment Gateway for Learnpress

WordPress plugin Zibal Payment Gateway for Learnpress scored 89% from 54 tests.

About plugin

  • Plugin page: zibal-payment-lea...
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 6.3.1
  • First release: Apr 20, 2021
  • Latest release: Aug 21, 2021
  • Number of updates: 6
  • Update frequency: every 71.2 days
  • Top authors: mzamanzadah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 765 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.00ms] Passed 4 tests

An overview of server-side resources used by Zibal Payment Gateway for Learnpress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.54 ▼4.56
Dashboard /wp-admin3.31 ▲0.0145.36 ▼8.08
Posts /wp-admin/edit.php3.36 ▲0.0147.93 ▼1.89
Add New Post /wp-admin/post-new.php5.89 ▲0.01101.04 ▲3.25
Media Library /wp-admin/upload.php3.24 ▲0.0033.53 ▼1.46

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Zibal Payment Gateway for Learnpress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲1813.28 ▼0.232.04 ▼3.4347.94 ▲1.72
Dashboard /wp-admin2,224 ▲185.77 ▲0.90100.75 ▼2.7344.09 ▲0.18
Posts /wp-admin/edit.php2,110 ▲242.12 ▲0.1335.20 ▼4.2335.55 ▼1.30
Add New Post /wp-admin/post-new.php1,532 ▲717.68 ▼3.76711.03 ▼55.2160.62 ▼3.27
Media Library /wp-admin/upload.php1,406 ▲244.19 ▼0.0398.27 ▼8.7049.70 ▼0.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: payment, zibal, lms, gateway, learnpress

zibal-payment-learnpress/learnpress-zibal.php 85% from 13 tests

This is the main PHP file of "Zibal Payment Gateway for Learnpress" version 1.2, 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:
  • 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 ("zibal-payment-learnpress.php" instead of "learnpress-zibal.php")

Code Analysis Passed 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 plugin500 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP591236406
PO File1212458
CSS10132
Markdown1304

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity13.33
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2177.78%
▷ Protected methods622.22%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
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
assets/images/zibal.png2.63KB2.07KB▼ 21.47%