68% rafflepress

Code Review | Giveaways and Contests by RafflePress - Get More Website Traffic, Email Subscribers, and Social Followers

WordPress plugin Giveaways and Contests by RafflePress - Get More Website Traffic, Email Subscribers, and Social Followers scored68%from 54 tests.

About plugin

  • Plugin page: rafflepress
  • Plugin version: 1.12.2
  • PHP compatiblity: 5.3.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Sep 9, 2018
  • Latest release: Oct 9, 2023
  • Number of updates: 105
  • Update frequency: every 17.7 days
  • Top authors: seedprod (99.05%)bizevolv (1.9%)

Code review

54 tests

User reviews

37 reviews

Install metrics

20,000+ active /273,727 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.69MB] [CPU: ▼2.35ms] Passed 4 tests

An overview of server-side resources used by Giveaways and Contests by RafflePress - Get More Website Traffic, Email Subscribers, and Social Followers
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4642.98 ▲4.05
Dashboard /wp-admin4.13 ▲0.7955.25 ▼11.23
Posts /wp-admin/edit.php4.18 ▲0.8355.07 ▲8.24
Add New Post /wp-admin/post-new.php6.65 ▲0.7693.88 ▼10.41
Media Library /wp-admin/upload.php3.99 ▲0.7642.77 ▲8.18
Giveaways /wp-admin/admin.php?page=rafflepress_lite4.9378.94
Add New /wp-admin/admin.php?page=rafflepress_lite_add_new3.8233.16
Builder /wp-admin/admin.php?page=rafflepress_lite_builder4.9259.41
Settings /wp-admin/admin.php?page=rafflepress_lite_settings3.8230.05
About Us /wp-admin/admin.php?page=rafflepress_lite_about_us3.8230.06
Get Pro /wp-admin/admin.php?page=rafflepress_lite_get_pro3.8238.56
Debug /wp-admin/admin.php?page=rafflepress_lite_debug4.0048.64

Server storage [IO: ▲7.42MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 179 new files
Database: 3 new tables, 13 new options
New tables
wp_rafflepress_giveaways
wp_rafflepress_entries
wp_rafflepress_contestants
New WordPress options
widget_theysaidso_widget
rafflepress_run_activation
rafflepress_notifications
rafflepress_version
theysaidso_admin_options
db_upgraded
can_compress_scripts
rafflepress_settings
rafflepress_token
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Giveaways and Contests by RafflePress - Get More Website Traffic, Email Subscribers, and Social Followers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲9713.33 ▼1.461.73 ▼0.6242.58 ▲0.58
Dashboard /wp-admin2,291 ▲884.92 ▼0.98104.74 ▼7.3039.60 ▼4.60
Posts /wp-admin/edit.php2,168 ▲682.07 ▲0.0336.90 ▼1.1433.31 ▼1.22
Add New Post /wp-admin/post-new.php6,227 ▲4,69519.00 ▼4.14925.67 ▲288.4365.97 ▲2.12
Media Library /wp-admin/upload.php1,472 ▲694.29 ▲0.08100.38 ▼1.1943.95 ▲0.41
Giveaways /wp-admin/admin.php?page=rafflepress_lite1,5477.86156.5447.56
Add New /wp-admin/admin.php?page=rafflepress_lite_add_new1,2458.39148.4128.57
Builder /wp-admin/admin.php?page=rafflepress_lite_builder1,2398.2799.6432.37
Settings /wp-admin/admin.php?page=rafflepress_lite_settings1,4347.7482.2543.82
About Us /wp-admin/admin.php?page=rafflepress_lite_about_us1,8698.1791.4754.63
Get Pro /wp-admin/admin.php?page=rafflepress_lite_get_pro1,3075.22137.9897.37
Debug /wp-admin/admin.php?page=rafflepress_lite_debug1,2047.2670.7823.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_rafflepress_contestants
    • wp_rafflepress_entries
    • wp_rafflepress_giveaways
  • The uninstall procedure has failed, leaving 13 options in the database
    • rafflepress_over_time
    • can_compress_scripts
    • rafflepress_review
    • theysaidso_admin_options
    • db_upgraded
    • rafflepress_run_activation
    • widget_theysaidso_widget
    • rafflepress_settings
    • rafflepress_token
    • rafflepress_version
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant RAFFLEPRESS_BUILD - assumed 'RAFFLEPRESS_BUILD' (this will throw an Error in a future version of PHP) in wp-content/plugins/rafflepress/resources/giveaway-templates/basic-giveaway.php on line 3
    • > PHP Warning
      require_once(RAFFLEPRESS_PLUGIN_PATHresources/views/backend-translations.php): failed to open stream: No such file or directory in wp-content/plugins/rafflepress/resources/views/builder.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/rafflepress/resources/views/backend-translations.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rafflepress/rafflepress.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rafflepress/app/includes/upgrade.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rafflepress/app/classic-editor.php:4
    • > PHP Warning
      Use of undefined constant RAFFLEPRESS_PLUGIN_PATH - assumed 'RAFFLEPRESS_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rafflepress/resources/views/dashboard.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/rafflepress/resources/views/rafflepress-giveaway.php:17
    • > PHP Fatal error
      require_once(): Failed opening required 'RAFFLEPRESS_PLUGIN_PATHresources/views/backend-translations.php' (include_path='.:/usr/share/php') in wp-content/plugins/rafflepress/resources/views/builder.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rafflepress/app/webhook-functions.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=rafflepress_lite_get_pro
    • > Javascript (severe) in unknown
    https://rafflepress.com/lite-upgrade/?utm_source=WordPress&utm_campaign=liteplugin&utm_medium=wp-sidebar-menu 498:71 Uncaught SyntaxError: Unexpected token ')'
    • > GET request to /wp-admin/admin.php?page=rafflepress_lite_debug
    • > Javascript (severe) in unknown
    /wp-content/plugins/rafflepress/public/lite/vue-backend/js/admin.js?ver=1.12.2 0:143656 Uncaught ReferenceError: rafflepress_data_admin is not defined

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: You are using too many tags: 27 tag instead of maximum 10
The official readme.txt is a good inspiration

rafflepress/rafflepress.php Passed 13 tests

Analyzing the main PHP file in "Giveaways and Contests by RafflePress - Get More Website Traffic, Email Subscribers, and Social Followers" version 1.12.2
84 characters long description:
RafflePress allows you to easily create giveaways, contests and rewards in WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin50,531 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code
CSS223,67611228,970
PHP372,0402,0029,984
SVG21009,586
JavaScript133392141,987
HTML3003
JSON1001

PHP code Passed 2 tests

Analyzing 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.41
Average class complexity83.70
▷ Minimum class complexity1.00
▷ Maximum class complexity380.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods230
▷ Static methods62.61%
▷ Public methods8536.96%
▷ Protected methods14462.61%
▷ Private methods10.43%
Functions108
▷ Named functions108100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.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
61 compressed PNG files occupy 0.37MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/plugin-exactmetrics.png2.20KB2.23KB0.00%
public/img/feature-7.png1.19KB1.18KB▼ 1.15%
public/img/integrations/activecampaign.png2.43KB2.46KB0.00%
public/img/integrations/getresponse.png0.78KB0.80KB0.00%
public/img/integrations/zapier.png0.58KB0.63KB0.00%