68% iran-donate

Code Review | Iran Donate

WordPress plugin Iran Donate scored68%from 54 tests.

About plugin

  • Plugin page: iran-donate
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1
  • WordPress version: 6.3.1
  • First release: Jul 21, 2016
  • Latest release: Feb 28, 2019
  • Number of updates: 20
  • Update frequency: every 47.6 days
  • Top authors: pash2048 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /931 total downloads

Benchmarks

Plugin footprint 65% 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.11MB] [CPU: ▼2.67ms] Passed 4 tests

An overview of server-side resources used by Iran Donate
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.25 ▼0.43
Dashboard /wp-admin3.42 ▲0.1258.29 ▲9.15
Posts /wp-admin/edit.php3.53 ▲0.1845.95 ▼6.01
Add New Post /wp-admin/post-new.php6.00 ▲0.1286.65 ▼1.02
Media Library /wp-admin/upload.php3.34 ▲0.1234.61 ▼3.21
تنظیمات /wp-admin/admin.php?page=irdonate_setting3.3230.83
پرداخت ها /wp-admin/admin.php?page=irdonate_main3.3232.19

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: 1 new table, 8 new options
New tables
wp_irdonate_payments
New WordPress options
widget_ezp_form_wight
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
irdonate_db_verizon
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Iran Donate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.84 ▲0.051.73 ▲0.0243.54 ▼2.22
Dashboard /wp-admin2,233 ▲474.82 ▼1.09106.51 ▲2.6846.74 ▲7.11
Posts /wp-admin/edit.php2,116 ▲272.00 ▼0.0433.77 ▼5.7237.30 ▲3.57
Add New Post /wp-admin/post-new.php1,564 ▲2218.37 ▼0.17632.74 ▼30.1651.16 ▼2.44
Media Library /wp-admin/upload.php1,418 ▲304.12 ▼0.08102.19 ▼5.9147.75 ▼1.33
تنظیمات /wp-admin/admin.php?page=irdonate_setting8252.0623.3655.91
پرداخت ها /wp-admin/admin.php?page=irdonate_main8762.0525.1739.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_irdonate_payments
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • irdonate_db_verizon
    • widget_ezp_form_wight
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/iran-donate/iran-donate.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/iran-donate/include/upgarade.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/iran-donate/include/widgets.php:2
    • > PHP Notice
      Undefined variable: result in wp-content/plugins/iran-donate/tamplate/html-user-return.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/iran-donate/include/upgarade.php on line 24
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/iran-donate/include/upgarade.php on line 24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: farapayamak, donate, zarinpal, parsian, faragate

iran-donate/iran-donate.php Passed 13 tests

The principal PHP file in "Iran Donate" v. 1.0.4 is loaded by WordPress automatically on each request
92 characters long description:
پلاگین حمایت از سایت با درگاه های فراگیت و زرین پال

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected908 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1233112872
CSS11036

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
PNG images were not found in this plugin