78% crowdfundly

Code Review | Crowdfundly

WordPress plugin Crowdfundly scored78%from 54 tests.

About plugin

  • Plugin page: crowdfundly
  • Plugin version: 2.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2021
  • Latest release: Jan 9, 2023
  • Number of updates: 47
  • Update frequency: every 14.7 days
  • Top authors: A.R.Naim (89.36%)crowdfundly (12.77%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /49,906 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

An overview of server-side resources used by Crowdfundly
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2543.11 ▲1.89
Dashboard /wp-admin3.52 ▲0.2254.43 ▲2.81
Posts /wp-admin/edit.php3.57 ▲0.2252.25 ▲2.55
Add New Post /wp-admin/post-new.php6.13 ▲0.2489.87 ▼7.66
Media Library /wp-admin/upload.php3.44 ▲0.2138.94 ▲4.88
Crowdfundly /wp-admin/admin.php?page=crowdfundly-admin3.4536.53
App Key Login /wp-admin/admin.php?page=crowdfundly-appkey-login3.4436.78
Sign Up /wp-admin/admin.php?page=crowdfundly-signup3.4636.37
Email Login /wp-admin/admin.php?page=crowdfundly-email-login3.4534.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 205 new files
Database: no new tables, 10 new options
New WordPress options
crowdfundly_organization_page_id
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
crowdfundly_url_update
crowdfundly_single_campaign_page_id
crowdfundly_all_campaigns_page_id
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Crowdfundly
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,066 ▲30523.44 ▲8.75584.27 ▲582.4146.94 ▲1.56
Dashboard /wp-admin2,246 ▲665.60 ▼0.0983.19 ▼6.1475.78 ▲32.02
Posts /wp-admin/edit.php2,155 ▲551.99 ▼0.0235.18 ▼2.3336.34 ▼0.36
Add New Post /wp-admin/post-new.php1,581 ▲4823.08 ▼0.03754.40 ▲61.9054.62 ▲2.71
Media Library /wp-admin/upload.php1,457 ▲604.23 ▲0.0997.35 ▼21.7280.34 ▲33.70
Crowdfundly /wp-admin/admin.php?page=crowdfundly-admin1,9518.01322.3890.98
App Key Login /wp-admin/admin.php?page=crowdfundly-appkey-login1,9548.01322.8351.47
Sign Up /wp-admin/admin.php?page=crowdfundly-signup2,0398.12139.5941.11
Email Login /wp-admin/admin.php?page=crowdfundly-email-login1,9978.01135.4541.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • crowdfundly_organization_page_id
    • widget_theysaidso_widget
    • crowdfundly_url_update
    • crowdfundly_single_campaign_page_id
    • crowdfundly_all_campaigns_page_id

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 27× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/dashboard/payouts/methods.php
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/campaign/manage/report.php
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/dashboard/campaigns/reports.php
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/campaign/manage/statistics.php
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/dashboard/settings/fundraiser.php
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/dashboard/roles/index.php
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/campaign/manage/updates.php
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/dashboard/settings/media.php
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/campaign/manage/presets.php
    • > /wp-content/plugins/crowdfundly/src/resources/views/admin/campaign/manage/endorsements.php
  • 201× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/crowdfundly/src/resources/views/public/single-campaign/campaign-detail.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/crowdfundly/src/resources/views/public/single-campaign/modal/campaign-reward-modal.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/crowdfundly/src/Helpers/Elementor/SingleCampaignWidget.php:20
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/crowdfundly/src/resources/views/public/single-campaign/campaign-activites-tab.php on line 12
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/crowdfundly/src/resources/views/public/organization/template-one.php on line 9
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/crowdfundly/src/resources/views/public/single-campaign/campaign-top-contributers.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cf_asset() in wp-content/plugins/crowdfundly/src/resources/views/admin/dashboard/settings/theme.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/crowdfundly/src/resources/views/public/single-campaign/campaign-similar-camp.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/crowdfundly/src/resources/views/public/single-campaign/modal/campaign-package-modal.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Crowdfundly\\App\\Controllers\\BaseController' not found in wp-content/plugins/crowdfundly/src/Controllers/OrganizationController.php:17

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 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9 in crowdfundly/assets to your readme.txt
The official readme.txt might help

crowdfundly/crowdfundly.php Passed 13 tests

The main PHP file in "Crowdfundly" ver. 2.2.2 adds more information about the plugin and also serves as the entry point for this plugin
110 characters long description:
All-in-one digital crowdfunding solution. Build your own crowdfunding platform to raise money for any purpose.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected67,863 lines of code in 177 files:
LanguageFilesBlank linesComment linesLines of code
CSS123,99711225,095
PHP1252,2411,36424,643
JavaScript194,5141,28316,764
SVG1833765
Markdown21250570
JSON10026

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity11.33
▷ Minimum class complexity1.00
▷ Maximum class complexity137.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces5
Interfaces1
Traits1
Classes40
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes12.50%
Methods278
▷ Static methods7526.98%
▷ Public methods24387.41%
▷ Protected methods134.68%
▷ Private methods227.91%
Functions30
▷ Named functions2066.67%
▷ Anonymous functions1033.33%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.42MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/admin/logo/crowdfundly.png19.40KB10.16KB▼ 47.62%
assets/images/icons/crowdfundly_grey_icon.png10.96KB7.21KB▼ 34.19%
assets/images/admin/theme-template/2.png139.35KB139.55KB0.00%
assets/images/admin/icons/payment/svg/stripe_bg.png33.80KB11.67KB▼ 65.49%
assets/images/public/avatar.png5.31KB2.22KB▼ 58.26%