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 scored 68% from 54 tests.

About plugin

  • Plugin page: rafflepress
  • Plugin version: 1.9.0
  • PHP compatiblity: 5.3.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9
  • WordPress version: 5.9.2
  • First release: Sep 9, 2018
  • Latest release: Sep 29, 2021
  • Number of updates: 80
  • Update frequency: every 14.0 days
  • Top authors: seedprod (98.75%)bizevolv (2.5%)

Code review

54 tests

User reviews

29 reviews

Install metrics

10,000+ active / 136,095 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.72MB] [CPU: ▼331.40ms] Passed 4 tests

A check 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.99 ▲0.8764.01 ▲44.24
Dashboard /wp-admin4.12 ▲0.7139.21 ▲3.07
Posts /wp-admin/edit.php4.35 ▲0.7145.52 ▼13.88
Add New Post /wp-admin/post-new.php7.65 ▲0.68103.26 ▼1,315.83
Media Library /wp-admin/upload.php4.07 ▲0.7828.12 ▲1.06
Get Pro /wp-admin/admin.php?page=rafflepress_lite_get_pro3.8421.76
Debug /wp-admin/admin.php?page=rafflepress_lite_debug4.0840.73
Giveaways /wp-admin/admin.php?page=rafflepress_lite4.99122.39
Add New /wp-admin/admin.php?page=rafflepress_lite_add_new3.8424.79
Builder /wp-admin/admin.php?page=rafflepress_lite_builder4.9848.92
About Us /wp-admin/admin.php?page=rafflepress_lite_about_us3.8424.18
Settings /wp-admin/admin.php?page=rafflepress_lite_settings3.8423.07

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 138 new files
Database: 3 new tables, 7 new options
New tables
wp_rafflepress_giveaways
wp_rafflepress_contestants
wp_rafflepress_entries
New WordPress options
rafflepress_token
rafflepress_notifications
rafflepress_review
rafflepress_run_activation
rafflepress_settings
rafflepress_version
rafflepress_over_time

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
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,856 ▲11215.56 ▼0.116.17 ▲0.133.08 ▲0.85
Dashboard /wp-admin2,950 ▲896.11 ▼0.00120.49 ▼14.73208.09 ▲47.79
Posts /wp-admin/edit.php2,768 ▲773.27 ▲0.0364.40 ▼3.48140.68 ▼8.75
Add New Post /wp-admin/post-new.php1,697 ▼5516.71 ▼4.63431.77 ▼43.69200.02 ▲26.65
Media Library /wp-admin/upload.php1,774 ▲765.54 ▲0.07146.46 ▼2.43234.00 ▲6.03
Get Pro /wp-admin/admin.php?page=rafflepress_lite_get_pro1,4164.55153.60219.86
Debug /wp-admin/admin.php?page=rafflepress_lite_debug1,5528.24144.9388.00
Giveaways /wp-admin/admin.php?page=rafflepress_lite1,9078.98161.45111.11
Add New /wp-admin/admin.php?page=rafflepress_lite_add_new1,6439.86135.18119.50
Builder /wp-admin/admin.php?page=rafflepress_lite_builder1,6359.55134.26116.99
About Us /wp-admin/admin.php?page=rafflepress_lite_about_us1,8598.69122.79159.16
Settings /wp-admin/admin.php?page=rafflepress_lite_settings1,7878.54116.64224.97

Uninstaller [IO: ▲0.00MB] [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_entries
    • wp_rafflepress_contestants
    • wp_rafflepress_giveaways
  • The uninstall procedure has failed, leaving 7 options in the database
    • rafflepress_settings
    • rafflepress_run_activation
    • rafflepress_review
    • rafflepress_version
    • rafflepress_notifications
    • rafflepress_token
    • rafflepress_over_time

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 27× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > 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/builder.php on line 4
    • > 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/frontend-translations.php:30
    • > 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 __() in wp-content/plugins/rafflepress/resources/views/backend-translations.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rafflepress/app/gblock.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/rafflepress/resources/emails/notification.php:89
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rafflepress/app/bootstrap.php:99
    • > 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/standalone.php:45

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > 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.9.0 0:118075 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 uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 27 tag instead of maximum 10
The official readme.txt is a good inspiration

rafflepress/rafflepress.php Passed 13 tests

The main PHP file in "Giveaways and Contests by RafflePress - Get More Website Traffic, Email Subscribers, and Social Followers" ver. 1.9.0 adds more information about the plugin and also serves as the entry point for this plugin
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 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin40,420 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
CSS994820,257
PHP361,9601,9239,543
SVG110138,628
JavaScript133552241,989
HTML3003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
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%
Functions99
▷ Named functions99100.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
42 PNG files occupy 0.26MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/icon-provider-constant-contact.png5.95KB6.25KB0.00%
public/img/logo-mono.png7.72KB5.53KB▼ 28.36%
public/img/icon-128x128.png2.63KB2.74KB0.00%
public/img/plugin-om.png45.24KB13.82KB▼ 69.45%
public/img/plugin-smtp.png8.19KB8.45KB0.00%