84% sweepwidget

Code Review | SweepWidget Contests, Giveaways, Sweepstakes, Raffles, Competitions

WordPress plugin SweepWidget Contests, Giveaways, Sweepstakes, Raffles, Competitions scored84%from 54 tests.

About plugin

  • Plugin page: sweepwidget
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: Jun 21, 2023
  • Number of updates: 97
  • Update frequency: every 11.5 days
  • Top authors: sweepwidget (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active /6,773 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.10ms] Passed 4 tests

This is a short check of server-side resources used by SweepWidget Contests, Giveaways, Sweepstakes, Raffles, Competitions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.79 ▲0.67
Dashboard /wp-admin3.40 ▲0.0647.89 ▼13.37
Posts /wp-admin/edit.php3.45 ▲0.1049.76 ▼0.10
Add New Post /wp-admin/post-new.php5.98 ▲0.1087.40 ▼11.59
Media Library /wp-admin/upload.php3.33 ▲0.1035.70 ▲2.50

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

SweepWidget Contests, Giveaways, Sweepstakes, Raffles, Competitions: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.86 ▼0.441.79 ▼0.0144.49 ▼0.99
Dashboard /wp-admin2,322 ▲1315.50 ▼0.55112.05 ▲11.0138.88 ▼2.24
Posts /wp-admin/edit.php2,209 ▲1202.21 ▲0.1539.09 ▼4.6736.36 ▼1.87
Add New Post /wp-admin/post-new.php1,532 ▲423.65 ▲5.55655.49 ▲58.5258.78 ▲2.60
Media Library /wp-admin/upload.php1,507 ▲1194.54 ▲0.3296.74 ▼4.0043.80 ▼1.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sweepwidget/trunk/sweepwidget.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sweepwidget/sweepwidget.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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:
  • Tags: Too many tags (39 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

sweepwidget/sweepwidget.php 92% from 13 tests

The entry point to "SweepWidget Contests, Giveaways, Sweepstakes, Raffles, Competitions" version 2.0.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 264 characters long)

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 detected1,686 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2292481,268
CSS1520416
JavaScript2182

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/public/img/sweepwidget_logo.png31.27KB10.76KB▼ 65.59%
public/img/sweepwidget_logo.png31.27KB10.76KB▼ 65.59%