89% wpxmas-snow

Code Review | WpXmas-Snow

WordPress plugin WpXmas-Snow scored89%from 54 tests.

About plugin

  • Plugin page: wpxmas-snow
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 22, 2015
  • Latest release: Nov 22, 2023
  • Number of updates: 26
  • Update frequency: every 111.3 days
  • Top authors: pankajgarg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,339 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.01MB] [CPU: ▼8.00ms] Passed 4 tests

Analyzing server-side resources used by WpXmas-Snow
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.81 ▼13.07
Dashboard /wp-admin3.32 ▲0.0243.58 ▼6.50
Posts /wp-admin/edit.php3.37 ▲0.0145.06 ▼5.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.23 ▼6.68
Media Library /wp-admin/upload.php3.25 ▲0.0134.01 ▼0.63

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WpXmas-Snow
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13714.43 ▲0.087.40 ▲5.68106.71 ▲62.44
Dashboard /wp-admin2,195 ▲185.67 ▲0.0387.93 ▼0.3839.26 ▼0.89
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0738.88 ▼4.6732.46 ▼3.69
Add New Post /wp-admin/post-new.php1,531 ▲523.23 ▲0.17632.46 ▲25.5154.31 ▲2.78
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0195.96 ▼0.9541.92 ▲2.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (WpXmas Snow.)
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

wpxmas-snow/init.php 92% from 13 tests

The main PHP file in "WpXmas-Snow" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpxmas-snow.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected154 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript151178
PHP3338572
CSS1014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods12
▷ Static methods18.33%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 1.62MB with 0.68MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/snowflake.png1.39KB1.24KB▼ 10.96%
screenshot-1.png1,654.76KB445.54KB▼ 73.08%