93% mygiveaway

Code Review | Thinktag Giveaway

WordPress plugin Thinktag Giveaway scored 93% from 54 tests.

About plugin

  • Plugin page: mygiveaway
  • Plugin version: 1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.0
  • WordPress version: 5.8.1
  • First release: Sep 23, 2014
  • Latest release: Sep 23, 2014
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: wp-thinktag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 569 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by Thinktag Giveaway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.19 ▲13.91
Dashboard /wp-admin3.07 ▲0.0145.96 ▲0.10
Posts /wp-admin/edit.php3.12 ▲0.0143.79 ▲4.67
Add New Post /wp-admin/post-new.php5.42 ▼0.0188.93 ▼566.32
Media Library /wp-admin/upload.php3.01 ▲0.0133.83 ▼1.42

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Thinktag Giveaway: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,705 ▲12316.21 ▲0.539.13 ▼1.5050.82 ▲1.61
Dashboard /wp-admin2,967 ▲305.91 ▼0.30140.05 ▼24.55112.45 ▼4.25
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0166.65 ▲1.8483.94 ▼13.71
Add New Post /wp-admin/post-new.php2,057 ▲44219.43 ▼2.61371.25 ▲97.37107.18 ▼1.60
Media Library /wp-admin/upload.php1,804 ▼65.01 ▼0.03150.00 ▲4.04122.95 ▲6.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mygiveaway/mygiveaway.php:56

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (See the youtube video https://www.youtube.com/watch?v=xDB-k1l04kA) image missing
Please take inspiration from this readme.txt

mygiveaway/mygiveaway.php 85% from 13 tests

"Thinktag Giveaway" version 1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "1")

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
Everything looks great! No dangerous files found in this plugin43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18943

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.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin