10% infunding

Code Review | InFunding - Plugin for Charity & Crowdfunding Website

WordPress plugin InFunding - Plugin for Charity & Crowdfunding Website scored10%from 54 tests.

About plugin

  • Plugin page: infunding
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Dec 16, 2016
  • Number of updates: 5
  • Update frequency: every 5.0 days
  • Top authors: inwavethemes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /5,141 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/infunding/infunding.php+33
    Trying to access array offset on value of type null

Server metrics [RAM: ▼1.91MB] [CPU: ▼51.83ms] Passed 4 tests

Server-side resources used by InFunding - Plugin for Charity & Crowdfunding Website
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.384.05 ▼36.49
Dashboard /wp-admin2.09 ▼1.216.30 ▼46.11
Posts /wp-admin/edit.php2.10 ▼1.266.08 ▼41.76
Add New Post /wp-admin/post-new.php2.09 ▼3.796.09 ▼82.97
Media Library /wp-admin/upload.php2.09 ▼1.135.59 ▼29.28
Donates /wp-admin/edit.php?post_type=infunding&page=payment2.106.48
Settings /wp-admin/edit.php?post_type=infunding&page=settings2.106.58
/wp-admin/admin.php?page=volunteer/edit2.106.43
Categories /wp-admin/edit-tags.php?taxonomy=infunding_category&post_type=infunding2.106.45
/wp-admin/admin.php?page=volunteer/addnew2.105.40
Tags /wp-admin/edit-tags.php?taxonomy=infunding_tag&post_type=infunding2.106.46
Add New /wp-admin/post-new.php?post_type=infunding2.105.57
/wp-admin/admin.php?page=donor/addnew2.1013.65
Members /wp-admin/edit.php?post_type=infunding&page=donor2.106.47
/wp-admin/admin.php?page=payment/edit2.106.19

Server storage [IO: ▲1.60MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • You have illegally modified 2 files (1.76KB) outside of "wp-content/plugins/infunding/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/single-infunding.php
    • (new file) wp-content/themes/twentytwentyone/taxonomy-infunding_category.php
Filesystem: 83 new files
Database: 4 new tables, 9 new options
New tables
wp_inf_donors
wp_inf_logs
wp_inf_orders
wp_inf_volunteer
New WordPress options
can_compress_scripts
inFundingVersion
widget_recent-comments
recovery_mode_email_last_sent
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
inf_settings
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by InFunding - Plugin for Charity & Crowdfunding Website
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,063 ▲30615.14 ▲0.763.65 ▲1.4637.10 ▼10.60
Dashboard /wp-admin2,423 ▲2356.75 ▲0.85142.48 ▲29.4641.91 ▼0.39
Posts /wp-admin/edit.php2,323 ▲2373.65 ▲1.5151.54 ▲14.9131.59 ▼2.29
Add New Post /wp-admin/post-new.php1,587 ▲5423.44 ▲0.66641.20 ▼18.7837.11 ▼14.09
Media Library /wp-admin/upload.php1,468 ▲864.51 ▲0.3496.11 ▼3.9847.98 ▲5.27
Donates /wp-admin/edit.php?post_type=infunding&page=payment1,2593.7449.5326.29
Settings /wp-admin/edit.php?post_type=infunding&page=settings3,4193.7363.3340.18
/wp-admin/admin.php?page=volunteer/edit1,0103.3939.9219.72
Categories /wp-admin/edit-tags.php?taxonomy=infunding_category&post_type=infunding1,4963.4545.1928.45
/wp-admin/admin.php?page=volunteer/addnew1,0133.2842.0520.58
Tags /wp-admin/edit-tags.php?taxonomy=infunding_tag&post_type=infunding1,4773.4844.3828.95
Add New /wp-admin/post-new.php?post_type=infunding3,6778.23177.9073.59
/wp-admin/admin.php?page=donor/addnew1,0133.2942.9720.25
Members /wp-admin/edit.php?post_type=infunding&page=donor7451.709.5221.25
/wp-admin/admin.php?page=payment/edit1,0133.2841.1019.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/infunding/infunding.php+33
    Trying to access array offset on value of type null
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=payment/edit
    • > Notice in wp-content/plugins/infunding/infunding.php+33
    Trying to access array offset on value of type null
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=payment/edit
    • > Notice in wp-content/plugins/infunding/includes/function.admin.php+770
    Undefined index: id
    • > GET request to /wp-admin/edit.php?post_type=infunding&page=donor
    • > Notice in wp-content/plugins/infunding/includes/views/member.list.php+21
    Undefined variable: utility
    • > GET request to /wp-admin/edit.php?post_type=infunding&page=donor
    • > Error in wp-content/plugins/infunding/includes/views/member.list.php+21
    Uncaught Error: Call to a member function getNoticeMessage() on null in wp-content/plugins/infunding/includes/views/member.list.php:21
    Stack trace:
    #0 wp-content/plugins/infunding/includes/function.admin.php(504): include_once()
    #1 wp-includes/class-wp-hook.php(310): inFundingDonorRenderPage()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/edit.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

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
The following issues need your attention
  • 33× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Inwave_Session' not found in wp-content/plugins/infunding/includes/themes/single-infunding.php:22
    • > PHP Notice
      Undefined variable: utility in wp-content/plugins/infunding/includes/views/logs.list.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/infunding/includes/views/logs.view.php:24
    • > PHP Notice
      Undefined variable: utility in wp-content/plugins/infunding/includes/views/volunteer.list.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/infunding/themes/list_campaigns-style1.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'inFundingUtility' not found in wp-content/plugins/infunding/themes/list_campaigns.php:19
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/infunding/themes/list_campaigns-style2.php:19
    • > PHP Fatal error
      Uncaught Error: Call to a member function getNoticeMessage() on null in wp-content/plugins/infunding/includes/views/member.edit.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/infunding/themes/volunteer_register.php:10
    • > PHP Fatal error
      Uncaught Error: Call to a member function getNoticeMessage() on null in wp-content/plugins/infunding/includes/views/volunteer.list.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=payment/edit
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/infunding/assets/js/infunding_admin.js?ver=1.0.0:48:56)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=payment/edit
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: fundraising, donate, volunteer, campaign, crowdfunding...

infunding/infunding.php Passed 13 tests

The primary PHP file in "InFunding - Plugin for Charity & Crowdfunding Website" version 1.0 is used by WordPress to initiate all plugin functionality
130 characters long description:
InFunding is an advanced WordPress plugin to create and manage charity campaigns, and appeal donation via Paypal or bank transfer.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected13,712 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP344528696,521
CSS112221343,452
JavaScript135616323,154
SVG100565
XML10020

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity29.22
▷ Minimum class complexity3.00
▷ Maximum class complexity125.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods137
▷ Static methods75.11%
▷ Public methods137100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions60
▷ Named functions60100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
13 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/owl-prev-v2.png1.09KB0.84KB▼ 23.21%
assets/images/notice.png1.16KB1.21KB0.00%
assets/images/event_chedule_bg.png4.01KB1.83KB▼ 54.44%
assets/images/error.png1.07KB1.16KB0.00%
assets/css/grabbing.png0.11KB0.14KB0.00%