10% xmas-widget

Code Review | Xmas Widget Little Elf

WordPress plugin Xmas Widget Little Elf scored 10% from 54 tests.

About plugin

  • Plugin page: xmas-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.6.1
  • WordPress version: 5.8.1
  • First release: Oct 24, 2016
  • Latest release: Oct 25, 2016
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: zerros24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,811 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/xmas-widget/xmas-widget.php+382
    Methods with the same name as their class will not be constructors in a future version of PHP; xmas_widget has a deprecated constructor

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

A check of server-side resources used by Xmas Widget Little Elf
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.44 ▲10.97
Dashboard /wp-admin3.08 ▲0.0248.86 ▼1.48
Posts /wp-admin/edit.php3.13 ▲0.0249.68 ▼29.31
Add New Post /wp-admin/post-new.php5.43 ▼0.0089.92 ▼567.99
Media Library /wp-admin/upload.php3.02 ▲0.0235.58 ▲0.88

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 37 new files
Database: no new tables, 1 new option
New WordPress options
widget_xmas_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Xmas Widget Little Elf
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.81 ▲0.319.58 ▲0.6043.68 ▼13.39
Dashboard /wp-admin2,967 ▲365.94 ▼0.06137.83 ▼24.12116.54 ▼2.43
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0058.82 ▼14.8190.59 ▼18.31
Add New Post /wp-admin/post-new.php1,683 ▼018.80 ▲0.13379.72 ▼58.23108.54 ▼3.81
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.02157.25 ▲2.57121.40 ▼3.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/xmas-widget/xmas-widget.php+157
    Undefined index: activated
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_xmas_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/xmas-widget/xmas-widget.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 90% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Add images for these screenshots: #2 (banner-772x250.jpg), #3 (icon-128x128.jpg), #4 (banner-1544x500.jpg)
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

xmas-widget/xmas-widget.php Passed 13 tests

The main file in "Xmas Widget Little Elf" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
50 characters long description:
Add personalized Christmas greetings to your site!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected929 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS2847444
PHP213133436
JavaScript2101049

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity30.00
▷ Minimum class complexity16.00
▷ Maximum class complexity44.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1780.95%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
25 compressed PNG files occupy 0.35MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/xmas-body-wrapping-paper-4.png20.82KB21.54KB0.00%
images/xmas-pin-4.png5.63KB2.31KB▼ 58.99%
images/xmas-snow-big.png4.87KB5.02KB0.00%
images/xmas-body-wrapping-paper-3.png49.90KB52.47KB0.00%
images/xmas-paperclip.png1.16KB1.18KB0.00%