84% xmas-snow

Code Review | Xmas Snow

WordPress plugin Xmas Snow scored84%from 54 tests.

About plugin

  • Plugin page: xmas-snow
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9
  • WordPress version: 6.3.1
  • First release: Dec 21, 2011
  • Latest release: Mar 24, 2018
  • Number of updates: 11
  • Update frequency: every 207.7 days
  • Top authors: graphicedit (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

80+ active /36,154 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Xmas Snow
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0143.38 ▼0.59
Dashboard /wp-admin3.58 ▲0.0149.47 ▼4.17
Posts /wp-admin/edit.php3.69 ▲0.0154.55 ▲3.34
Add New Post /wp-admin/post-new.php6.16 ▲0.0187.70 ▼5.16
Media Library /wp-admin/upload.php3.50 ▲0.0139.79 ▲3.83

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Xmas Snow
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16213.24 ▼1.199.55 ▲7.30112.93 ▲66.04
Dashboard /wp-admin2,198 ▲215.68 ▼0.0092.43 ▲1.3742.75 ▼4.26
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0036.78 ▲1.0533.52 ▼4.69
Add New Post /wp-admin/post-new.php1,545 ▲1923.40 ▲5.94661.77 ▼62.0062.30 ▲5.73
Media Library /wp-admin/upload.php1,400 ▲34.22 ▼0.05105.18 ▼1.8246.35 ▲2.36

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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 | 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 add_action() in wp-content/plugins/xmas-snow/xmas-snow.php:136

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Xmas Snow.) image required
You can take inspiration from this readme.txt

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

The principal PHP file in "Xmas Snow" v. 1.0.2 is loaded by WordPress automatically on each request
27 characters long description:
This plugin adds Xmas Snow.

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 detected89 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1163389

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
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%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin