84% giveaway-boost

Code Review | Giveaway Boost

WordPress plugin Giveaway Boost scored84%from 54 tests.

About plugin

  • Plugin page: giveaway-boost
  • Plugin version: 2.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.6
  • WordPress version: 6.3.1
  • First release: Mar 24, 2017
  • Latest release: Nov 12, 2018
  • Number of updates: 14
  • Update frequency: every 42.6 days
  • Top authors: giveawayboost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,734 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
Installer ran successfully

Server metrics [RAM: ▲0.91MB] [CPU: ▼5.02ms] Passed 4 tests

An overview of server-side resources used by Giveaway Boost
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9042.73 ▲0.76
Dashboard /wp-admin4.23 ▲0.8848.43 ▼12.31
Posts /wp-admin/edit.php4.34 ▲0.9952.31 ▲1.49
Add New Post /wp-admin/post-new.php6.81 ▲0.9295.80 ▼10.03
Media Library /wp-admin/upload.php4.15 ▲0.9242.49 ▲6.70
Settings /wp-admin/edit.php?post_type=gb_giveaway&page=gb_settings4.1736.66
All Promotions /wp-admin/edit.php?post_type=gb_giveaway4.2040.75
New Giveaway /wp-admin/post-new.php?post_type=gb_giveaway4.4666.84

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 104 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Giveaway Boost
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲10513.19 ▼1.091.53 ▼0.2938.10 ▼3.91
Dashboard /wp-admin2,254 ▲624.89 ▼0.08107.37 ▲1.4142.24 ▲1.01
Posts /wp-admin/edit.php2,144 ▲552.01 ▼0.0140.02 ▼1.5135.82 ▼0.91
Add New Post /wp-admin/post-new.php1,568 ▲5418.41 ▲0.81606.38 ▼2.9952.83 ▲9.74
Media Library /wp-admin/upload.php1,436 ▲454.22 ▼0.0197.25 ▼1.5140.77 ▼1.63
Settings /wp-admin/edit.php?post_type=gb_giveaway&page=gb_settings1,4255.90132.7958.55
All Promotions /wp-admin/edit.php?post_type=gb_giveaway1,0941.9730.8829.65
New Giveaway /wp-admin/post-new.php?post_type=gb_giveaway3,94610.61260.57138.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • gb_template_update
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function path_join() in wp-content/plugins/giveaway-boost/giveaway-boost.php:12

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: admin, content types

giveaway-boost/giveaway-boost.php Passed 13 tests

The entry point to "Giveaway Boost" version 2.1.4 is a PHP file that has certain tags in its header comment area
44 characters long description:
Easily run giveaways on your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected6,392 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
PHP621,2456693,008
SVG1002,671
CSS78211449
JavaScript57435264

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity12.17
▷ Minimum class complexity4.00
▷ Maximum class complexity74.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods207
▷ Static methods207100.00%
▷ Public methods14570.05%
▷ Protected methods00.00%
▷ Private methods6229.95%
Functions84
▷ Named functions6071.43%
▷ Anonymous functions2428.57%
Constants35
▷ Global constants35100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
20 PNG files occupy 0.40MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor-assets/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
vendor-assets/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
vendor-assets/jquery-ui/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
screenshots/screenshot-4.png45.71KB26.58KB▼ 41.84%
screenshots/screenshot-2.png27.60KB15.55KB▼ 43.66%