89% zarinpal-provip-payment

Code Review | Zarinpal for ProVIP

WordPress plugin Zarinpal for ProVIP scored89%from 54 tests.

About plugin

  • Plugin page: zarinpal-provip-p...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: Jul 25, 2016
  • Number of updates: 4
  • Update frequency: every 8.8 days
  • Top authors: Amini7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,005 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Zarinpal for ProVIP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.39 ▲1.23
Dashboard /wp-admin3.33 ▼0.0243.38 ▼14.78
Posts /wp-admin/edit.php3.38 ▲0.0245.55 ▼5.27
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.60 ▼19.97
Media Library /wp-admin/upload.php3.25 ▲0.0233.16 ▼3.07

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Zarinpal for ProVIP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.121.69 ▼0.1439.51 ▼3.45
Dashboard /wp-admin2,203 ▲115.89 ▼0.16110.80 ▼0.6540.30 ▼1.43
Posts /wp-admin/edit.php2,092 ▲31.99 ▲0.0240.14 ▲0.2036.07 ▲1.30
Add New Post /wp-admin/post-new.php1,519 ▼1623.28 ▲0.07670.94 ▼3.0655.75 ▼1.79
Media Library /wp-admin/upload.php1,388 ▼34.19 ▲0.0394.06 ▼4.3542.19 ▼2.74

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 detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

zarinpal-provip-payment/pro-vip-zarinpal.php 92% from 13 tests

Analyzing the main PHP file in "Zarinpal for ProVIP" version 1.1
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("zarinpal-provip-payment.php" instead of "pro-vip-zarinpal.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
No dangerous file extensions were detected115 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12911115

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin