62% erima-zarinpal-donate

Code Review | Erima Zarinpal Donate

WordPress plugin Erima Zarinpal Donate scored62%from 54 tests.

About plugin

  • Plugin page: erima-zarinpal-do...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2015
  • Latest release: Feb 25, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: seyyed-amir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /9,094 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.30ms] Passed 4 tests

Server-side resources used by Erima Zarinpal Donate
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.92 ▼5.40
Dashboard /wp-admin3.37 ▲0.0750.79 ▲1.94
Posts /wp-admin/edit.php3.42 ▲0.0653.25 ▲1.11
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.45 ▼10.84
Media Library /wp-admin/upload.php3.30 ▲0.0644.47 ▲8.50
حمات مالی /wp-admin/admin.php?page=EZD_MenuItem3.2733.90
نمایش حامیان مالی /wp-admin/admin.php?page=EZD_Hamian3.2834.40

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: 1 new table, 12 new options
New tables
wp_erima_donate
New WordPress options
widget_recent-comments
can_compress_scripts
EZD_TotalAmount
EZD_IsOK
EZD_TotalPayment
EZD_CustomStyle
EZD_IsError
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

Erima Zarinpal Donate: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.27 ▼1.271.56 ▼0.1645.89 ▲2.63
Dashboard /wp-admin2,229 ▲506.03 ▲1.16123.32 ▼0.8848.93 ▲1.51
Posts /wp-admin/edit.php2,112 ▲232.04 ▲0.0740.70 ▼11.9143.64 ▲6.21
Add New Post /wp-admin/post-new.php1,543 ▲1023.17 ▼0.20675.58 ▼19.1173.50 ▲19.36
Media Library /wp-admin/upload.php1,408 ▲204.21 ▲0.03111.33 ▲3.0455.33 ▲10.95
حمات مالی /wp-admin/admin.php?page=EZD_MenuItem9122.0227.4258.94
نمایش حامیان مالی /wp-admin/admin.php?page=EZD_Hamian9012.0430.1046.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_erima_donate
  • Zombie WordPress options were found after uninstall: 12 options
    • EZD_IsError
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • EZD_TotalAmount
    • EZD_IsOK
    • EZD_TotalPayment
    • db_upgraded
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=EZD_Hamian
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=EZD_Hamian
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 25 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=EZD_Hamian
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=EZD_Hamian
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object
    • > GET request to /wp-admin/admin.php?page=EZD_Hamian
    • > Notice in wp-content/plugins/erima-zarinpal-donate/ErimaZarinpalDonate.php+508
    Undefined index: HTTPS
    • > GET request to /wp-admin/admin.php?page=EZD_Hamian
    • > Notice in wp-content/plugins/erima-zarinpal-donate/EZD_Hamian.php+84
    Undefined variable: Limit
    • > GET request to /wp-admin/admin.php?page=EZD_Hamian
    • > Notice in wp-content/plugins/erima-zarinpal-donate/EZD_Hamian.php+86
    Undefined variable: resault

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/erima-zarinpal-donate/EZD_AdminPage.php
    • > /wp-content/plugins/erima-zarinpal-donate/ErimaZarinpalDonate.php
    • > /wp-content/plugins/erima-zarinpal-donate/EZD_Hamian.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/erima-zarinpal-donate/lib/class.soapclient.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/erima-zarinpal-donate/lib/class.soap_transport_http.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/erima-zarinpal-donate/lib/class.soap_fault.php:14
    • > PHP Warning
      require_once(Mail/mimeDecode.php): failed to open stream: No such file or directory in wp-content/plugins/erima-zarinpal-donate/lib/nusoapmime.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/erima-zarinpal-donate/lib/class.soap_val.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/erima-zarinpal-donate/lib/class.soap_parser.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'Mail/mimeDecode.php' (include_path='.:/usr/share/php') in wp-content/plugins/erima-zarinpal-donate/lib/nusoapmime.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/erima-zarinpal-donate/lib/class.soap_server.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/erima-zarinpal-donate/lib/class.xmlschema.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/erima-zarinpal-donate/lib/class.wsdl.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 require attention: The official readme.txt might help

erima-zarinpal-donate/ErimaZarinpalDonate.php 85% from 13 tests

The principal PHP file in "Erima Zarinpal Donate" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 220 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("erima-zarinpal-donate.php" instead of "ErimaZarinpalDonate.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
Success! There were no dangerous files found in this plugin11,564 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP159675,13111,564

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity78.53
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity9.24
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes34
▷ Abstract classes00.00%
▷ Concrete classes34100.00%
▷ Final classes00.00%
Methods320
▷ Static methods00.00%
▷ Public methods320100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin