84% gift-hunt

Code Review | Gift Hunt

WordPress plugin Gift Hunt scored84%from 54 tests.

About plugin

  • Plugin page: gift-hunt
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1.0
  • WordPress version: 6.3.1
  • First release: Nov 20, 2019
  • Latest release: Nov 14, 2022
  • Number of updates: 15
  • Update frequency: every 72.7 days
  • Top authors: ferkho (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,142 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.21MB] [CPU: ▲1.95ms] Passed 4 tests

An overview of server-side resources used by Gift Hunt
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2444.65 ▲8.35
Dashboard /wp-admin3.51 ▲0.2049.63 ▲2.02
Posts /wp-admin/edit.php3.62 ▲0.2645.10 ▼1.88
Add New Post /wp-admin/post-new.php6.09 ▲0.2091.17 ▲2.32
Media Library /wp-admin/upload.php3.43 ▲0.2038.88 ▲5.33
Add New /wp-admin/admin.php?page=gifthuntfree-sessions&p=session-create3.5441.41
Gift Hunt /wp-admin/admin.php?page=gifthuntfree-sessions3.4334.10
Mailchimp Integration /wp-admin/admin.php?page=gifthuntfree-sessions&p=mailchimp-integration3.4541.21

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 72 new files
Database: 5 new tables, 6 new options
New tables
wp_ff_gifthuntfree_gifts
wp_ff_mailchimp_settings
wp_ff_mailchimp_logs
wp_ff_gifthuntfree_sessions
wp_ff_gifthuntfree_hunters
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Gift Hunt
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11114.39 ▼0.191.64 ▲0.0640.73 ▲2.13
Dashboard /wp-admin2,274 ▲945.54 ▼0.0884.50 ▼0.1836.43 ▼7.30
Posts /wp-admin/edit.php2,182 ▲821.99 ▼0.0236.48 ▲1.8937.43 ▲2.71
Add New Post /wp-admin/post-new.php1,551 ▲2323.17 ▲0.25649.01 ▼6.5256.60 ▲0.86
Media Library /wp-admin/upload.php1,486 ▲864.22 ▲0.00108.57 ▲7.4446.98 ▲3.65
Add New /wp-admin/admin.php?page=gifthuntfree-sessions&p=session-create5,29810.04196.11154.83
Gift Hunt /wp-admin/admin.php?page=gifthuntfree-sessions1,4909.30269.9068.11
Mailchimp Integration /wp-admin/admin.php?page=gifthuntfree-sessions&p=mailchimp-integration1,3122.0127.0958.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 24× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/gift-hunt/views/gifthunt-sessions.view.php
    • > /wp-content/plugins/gift-hunt/views/form-components/visibility-settings.php
    • > /wp-content/plugins/gift-hunt/views/gifthunt-session-edit.view.php
    • > /wp-content/plugins/gift-hunt/views/success-email-templates/christmas.php
    • > /wp-content/plugins/gift-hunt/views/success-email-templates/halloween.php
    • > /wp-content/plugins/gift-hunt/views/form-components/data-collection-options.php
    • > /wp-content/plugins/gift-hunt/views/gifthunt-mailchimp-log.view.php
    • > /wp-content/plugins/gift-hunt/views/gifthunt-session-create.view.php
    • > /wp-content/plugins/gift-hunt/views/success-email-templates/default-dark.php
    • > /wp-content/plugins/gift-hunt/views/form-components/get-started.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were found

gift-hunt/gifthuntfree.php 85% from 13 tests

The main PHP script in "Gift Hunt" version 2.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gift-hunt.php" instead of "gifthuntfree.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin8,541 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP277085504,638
JavaScript63023901,546
Sass11780994
CSS715418791
SVG1100512
HTML38060

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity86.75
▷ Minimum class complexity12.00
▷ Maximum class complexity193.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods97
▷ Static methods1212.37%
▷ Public methods6971.13%
▷ Protected methods1414.43%
▷ Private methods1414.43%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.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
11 PNG files occupy 0.32MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/success-email-templates/easter.png26.10KB10.68KB▼ 59.08%
assets/images/success-email-templates/unstyled.png24.36KB9.64KB▼ 60.42%
assets/images/success-email-templates/default-dark.png25.10KB10.94KB▼ 56.40%
assets/images/success-email-templates/halloween.png24.34KB10.44KB▼ 57.13%
assets/images/popup/default_dark.png28.00KB12.52KB▼ 55.27%