Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
- This plugin did not install gracefully
- > Notice in wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php+39
Undefined variable: zarinpal_currency_list
Server metrics [RAM: ▼1.96MB] [CPU: ▼53.72ms] Passed 4 tests
Server-side resources used by Zarinpal Paid Download
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.03 ▼1.43 | 5.04 ▼37.53 |
Dashboard /wp-admin | 2.05 ▼1.26 | 5.30 ▼46.52 |
Posts /wp-admin/edit.php | 2.05 ▼1.31 | 5.51 ▼38.77 |
Add New Post /wp-admin/post-new.php | 2.05 ▼3.84 | 5.99 ▼92.06 |
Media Library /wp-admin/upload.php | 2.05 ▼1.18 | 4.82 ▼29.00 |
فايلها /wp-admin/admin.php?page=paid-downloads-files | 2.05 | 5.82 |
پرداخت ها /wp-admin/admin.php?page=paid-downloads-transactions | 2.05 | 5.31 |
لينک هاي دريافت /wp-admin/admin.php?page=paid-downloads-links | 2.05 | 7.11 |
اضافه کردن فايل /wp-admin/admin.php?page=paid-downloads-add | 2.05 | 5.66 |
تنظيمات /wp-admin/admin.php?page=paid-downloads | 2.05 | 5.62 |
اضافه کردن لينک /wp-admin/admin.php?page=paid-downloads-add-link | 2.05 | 5.18 |
Server storage [IO: ▲0.28MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: 4 new tables, 6 new options
New tables |
---|
wp_pd_orders |
wp_pd_transactions |
wp_pd_files |
wp_pd_downloadlinks |
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
Zarinpal Paid Download: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,940 ▲205 | 14.04 ▼0.33 | 4.79 ▲2.70 | 41.58 ▼2.94 |
Dashboard /wp-admin | 2,267 ▲79 | 4.85 ▼0.23 | 107.12 ▼3.21 | 56.35 ▲14.50 |
Posts /wp-admin/edit.php | 2,147 ▲61 | 2.03 ▼0.01 | 39.26 ▲1.85 | 53.11 ▲17.87 |
Add New Post /wp-admin/post-new.php | 1,563 ▲35 | 23.22 ▲4.98 | 646.42 ▲3.76 | 62.89 ▲14.00 |
Media Library /wp-admin/upload.php | 1,443 ▲52 | 4.20 ▼0.12 | 95.54 ▲0.09 | 54.04 ▲8.02 |
فايلها /wp-admin/admin.php?page=paid-downloads-files | 911 | 2.14 | 26.40 | 57.91 |
پرداخت ها /wp-admin/admin.php?page=paid-downloads-transactions | 852 | 2.03 | 24.41 | 44.97 |
لينک هاي دريافت /wp-admin/admin.php?page=paid-downloads-links | 870 | 2.06 | 26.70 | 43.73 |
اضافه کردن فايل /wp-admin/admin.php?page=paid-downloads-add | 1,039 | 2.20 | 26.15 | 107.86 |
تنظيمات /wp-admin/admin.php?page=paid-downloads | 1,190 | 1.81 | 24.85 | 59.90 |
اضافه کردن لينک /wp-admin/admin.php?page=paid-downloads-add-link | 812 | 2.04 | 25.16 | 38.64 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- The plugin did not uninstall gracefully
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- Zombie tables detected upon uninstall: 4 tables
- wp_pd_orders
- wp_pd_files
- wp_pd_downloadlinks
- wp_pd_transactions
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
- 6 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=paid-downloads-add-link
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 6 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=paid-downloads-add-link
- > Notice in wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php+39
Undefined variable: zarinpal_currency_list
- 12 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=paid-downloads-add-link
- > Notice in wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php+39
Trying to access array offset on value of type null
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=paid-downloads-add
- > Notice in wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php+648
Undefined variable: message
- 6 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=paid-downloads-add
- > Notice in wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php+720
Undefined variable: file_details
- > GET request to /wp-admin/admin.php?page=paid-downloads-add
- > Notice in wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php+680
Undefined variable: files
- > GET request to /wp-admin/admin.php?page=paid-downloads-add
- > Warning in wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php+680
Invalid argument supplied for foreach()
- > GET request to /wp-admin/admin.php?page=paid-downloads
- > Notice in wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php+314
Undefined index: updated
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
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
1 plugin tags: zarinpal
zarinpal-paid-downloads/zarinpalpaid-downloads.php 85% from 13 tests
This is the main PHP file of "Zarinpal Paid Download" version 2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 154 characters long)
- Main file name: It is recommended to name the main PHP file as the plugin slug ("zarinpal-paid-downloads.php" instead of "zarinpalpaid-downloads.php")
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
Success! There were no dangerous files found in this plugin3,035 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 166 | 33 | 1,842 |
PO File | 2 | 414 | 556 | 857 |
CSS | 1 | 51 | 0 | 335 |
HTML | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 295.00 |
▷ Minimum class complexity | 295.00 |
▷ Maximum class complexity | 295.00 |
Average method complexity | 11.89 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 81.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 27 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 27 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/success01.png | 0.50KB | 0.35KB | ▼ 29.16% |
images/transactions.png | 0.51KB | 0.37KB | ▼ 27.06% |
images/linkhistory.png | 0.52KB | 0.56KB | 0.00% |
images/failed01.png | 0.57KB | 0.43KB | ▼ 25.00% |
images/downloadlink.png | 0.54KB | 0.65KB | 0.00% |