78% raffle-play-woo

Code Review | Raffle Play Woocommerce

WordPress plugin Raffle Play Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: raffle-play-woo
  • Plugin version: 2.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Jan 26, 2021
  • Latest release: Nov 10, 2023
  • Number of updates: 54
  • Update frequency: every 18.9 days
  • Top authors: dan009 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /5,873 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.28ms] Passed 4 tests

Analyzing server-side resources used by Raffle Play Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.35 ▲1.00
Dashboard /wp-admin3.32 ▲0.0245.14 ▼3.38
Posts /wp-admin/edit.php3.37 ▲0.0245.39 ▼3.84
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.71 ▼10.90
Media Library /wp-admin/upload.php3.24 ▲0.0234.69 ▲2.16

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 193 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Raffle Play Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5614.20 ▼0.141.72 ▼0.0242.40 ▼3.57
Dashboard /wp-admin2,202 ▲255.55 ▼0.1283.00 ▼7.0838.81 ▼3.09
Posts /wp-admin/edit.php2,113 ▲102.03 ▲0.0434.69 ▼4.1333.67 ▼3.27
Add New Post /wp-admin/post-new.php1,534 ▲823.46 ▲0.17698.51 ▲51.3061.00 ▲9.73
Media Library /wp-admin/upload.php1,410 ▲74.21 ▼0.0598.42 ▲2.2643.40 ▲0.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 18× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/raffle-play-woo/uninstall.php
    • > /wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_MainPage.php
    • > /wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_AuditPage.php
    • > /wp-content/plugins/raffle-play-woo/includes/RafflePlayWoo_OptionsManager.php
    • > /wp-content/plugins/raffle-play-woo/raffle-play-woo.php
    • > /wp-content/plugins/raffle-play-woo/raffle-play-woo_init.php
    • > /wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_Releases.php
    • > /wp-content/plugins/raffle-play-woo/includes/d/D_RafflePlayWoo_Main.php
    • > /wp-content/plugins/raffle-play-woo/includes/RafflePlayWoo_LifeCycle.php
    • > /wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_ViewPage.php
  • 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'RAFFLE_PLAY_WOO_DIR_PATH/includes/RafflePlayWoo_Includes.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_MainPage.php on line 5
    • > PHP Warning
      require_once(RAFFLE_PLAY_WOO_DIR_PATH/includes/RafflePlayWoo_Includes.php): failed to open stream: No such file or directory in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_Reports.php on line 5
    • > PHP Warning
      include_once(): Failed opening 'RAFFLE_PLAY_WOO_DIR_PATH/includes/RafflePlayWoo_Includes.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_AuditPage.php on line 4
    • > PHP Warning
      Use of undefined constant RAFFLE_PLAY_WOO_DIR_PATH - assumed 'RAFFLE_PLAY_WOO_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_Winners.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'RAFFLE_PLAY_WOO_DIR_PATH/includes/RafflePlayWoo_Includes.php' (include_path='.:/usr/share/php') in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_Reports.php on line 5
    • > PHP Warning
      include_once(RAFFLE_PLAY_WOO_DIR_PATH/includes/RafflePlayWoo_Includes.php): failed to open stream: No such file or directory in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_Raffles.php on line 4
    • > PHP Warning
      Use of undefined constant RAFFLE_PLAY_WOO_DIR_PATH - assumed 'RAFFLE_PLAY_WOO_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_Raffles.php on line 4
    • > PHP Warning
      include_once(RAFFLE_PLAY_WOO_DIR_PATH/includes/RafflePlayWoo_Includes.php): failed to open stream: No such file or directory in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_ViewPage.php on line 4
    • > PHP Warning
      include_once(RAFFLE_PLAY_WOO_DIR_PATH/includes/RafflePlayWoo_Includes.php): failed to open stream: No such file or directory in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_MainPage.php on line 5
    • > PHP Warning
      include_once(): Failed opening 'RAFFLE_PLAY_WOO_DIR_PATH/includes/RafflePlayWoo_Includes.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/raffle-play-woo/includes/w/W_RafflePlayWoo_Raffles.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #11, #12, #13, #14, #2, #3, #4, #5, #6, #7, #8, #9 in raffle-play-woo/assets to your readme.txt
You can look at the official readme.txt

raffle-play-woo/raffle-play-woo.php 92% from 13 tests

The principal PHP file in "Raffle Play Woocommerce" v. 2.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 278 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin47,357 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
PO File226,9308,72317,469
CSS343,71236513,944
SVG4008,899
PHP291,448875,246
JavaScript123531201,799

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity18.50
▷ Minimum class complexity1.00
▷ Maximum class complexity158.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces17
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods279
▷ Static methods145.02%
▷ Public methods17863.80%
▷ Protected methods8329.75%
▷ Private methods186.45%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants49
▷ Global constants48.16%
▷ Class constants4591.84%
▷ Public constants45100.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
39 PNG files occupy 0.27MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jquery/themes/base/images/ui-icons_cc0000_256x240.png4.57KB4.18KB▼ 8.43%
jquery/themes/sunny/images/ui-bg_diagonals-medium_20_d34d17_40x40.png0.43KB0.11KB▼ 73.86%
jquery/themes/sunny/images/ui-bg_highlight-soft_100_feeebd_1x100.png0.39KB0.18KB▼ 52.87%
jquery/themes/sunny/images/ui-bg_gloss-wave_70_ffdd57_500x100.png5.47KB2.03KB▼ 62.81%
images/icons/info/email_template_labels.png15.50KB9.03KB▼ 41.76%