78% idonate

Code Review | IDonate - blood request management system

WordPress plugin IDonate - blood request management system scored78%from 54 tests.

About plugin

  • Plugin page: idonate
  • Plugin version: 1.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 12, 2017
  • Latest release: Nov 16, 2023
  • Number of updates: 46
  • Update frequency: every 47.1 days
  • Top authors: unitetheme (91.3%)themeatelier (10.87%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active /4,506 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.42ms] Passed 4 tests

Analyzing server-side resources used by IDonate - blood request management system
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.51 ▼3.36
Dashboard /wp-admin3.40 ▲0.1046.23 ▼5.41
Posts /wp-admin/edit.php3.48 ▲0.1349.40 ▲2.38
Add New Post /wp-admin/post-new.php6.01 ▲0.1297.61 ▲1.98
Media Library /wp-admin/upload.php3.33 ▲0.1034.98 ▲1.13
Blood Request /wp-admin/edit.php?post_type=blood_request3.3736.23
IDonate Settings /wp-admin/admin.php?page=idonate-setting-admin3.3034.38

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 82 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_idonate_blood_request_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for IDonate - blood request management system
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,027 ▲26513.60 ▼0.6310.43 ▲8.7527.85 ▼17.26
Dashboard /wp-admin2,304 ▲1275.78 ▲0.2394.97 ▼7.6947.78 ▲4.68
Posts /wp-admin/edit.php2,183 ▲832.42 ▲0.4441.51 ▲5.4535.41 ▼1.32
Add New Post /wp-admin/post-new.php1,594 ▲6823.26 ▲0.01665.79 ▲1.1434.29 ▼37.04
Media Library /wp-admin/upload.php1,477 ▲834.46 ▲0.28100.86 ▼6.0243.26 ▼3.39
Blood Request /wp-admin/edit.php?post_type=blood_request1,1442.2537.7031.88
IDonate Settings /wp-admin/admin.php?page=idonate-setting-admin1,9382.0228.2232.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_idonate_blood_request_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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 following issues need your attention
  • 21× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/idonate/templates/single-blood_request.php
    • > /wp-content/plugins/idonate/inc/widget-blood-requiest.php
    • > /wp-content/plugins/idonate/inc/helper-functions.php
    • > /wp-content/plugins/idonate/templates/post-blood-request.php
    • > /wp-content/plugins/idonate/inc/form-data-handle.php
    • > /wp-content/plugins/idonate/inc/donor-functions.php
    • > /wp-content/plugins/idonate/inc/meta-fields/tatcmf.php
    • > /wp-content/plugins/idonate/inc/meta-fields/tatcmf-config.php
    • > /wp-content/plugins/idonate/inc/social-share.php
    • > /wp-content/plugins/idonate/inc/meta-fields/fields/checkbox-fields.php
  • 48× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant IDONATE_ALERT_MSG - assumed 'IDONATE_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/idonate/inc/class-enqueue.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/idonate/inc/countries/states/US.php:11
    • > PHP Warning
      Use of undefined constant IDONATE_ALERT_MSG - assumed 'IDONATE_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/idonate/inc/social-share.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/idonate/inc/countries/states/ZA.php:11
    • > PHP Warning
      Use of undefined constant IDONATE_ALERT_MSG - assumed 'IDONATE_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/idonate/inc/IDonate_ajax_handler.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/idonate/inc/countries/states/SA.php:11
    • > PHP Warning
      Use of undefined constant IDONATE_ALERT_MSG - assumed 'IDONATE_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/idonate/templates/blood-request.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/idonate/inc/countries/states/ES.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/idonate/inc/class-idonate-dashboardwidgets.php:7
    • > PHP Warning
      Use of undefined constant IDONATE_ALERT_MSG - assumed 'IDONATE_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/idonate/inc/meta-fields/fields/email-fields.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #1, #10, #2, #3, #4, #5, #6, #7, #8, #9 in idonate/assets to your readme.txt
  • Tags: There are too many tags (19 tag instead of maximum 10)
You can look at the official readme.txt

idonate/idonate.php Passed 13 tests

The principal PHP file in "IDonate - blood request management system" v. 1.8.1 is loaded by WordPress automatically on each request
89 characters long description:
IDonate blood request management system WordPress plugin. Easy to use, easy to customize.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin7,683 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP518931,0074,050
SVG2002,959
CSS71541546
JavaScript46237128

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity19.44
▷ Minimum class complexity2.00
▷ Maximum class complexity67.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods100
▷ Static methods55.00%
▷ Public methods7979.00%
▷ Protected methods55.00%
▷ Private methods1616.00%
Functions32
▷ Named functions3093.75%
▷ Anonymous functions26.25%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/heart-01.png42.32KB13.38KB▼ 68.39%
img/settings-icon.png0.75KB0.78KB0.00%