78% snow-flakes

Code Review | Snow Flakes

WordPress plugin Snow Flakes scored78%from 54 tests.

About plugin

  • Plugin page: snow-flakes
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 18, 2021
  • Latest release: Dec 18, 2021
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: nima_rahbar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /475 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.66ms] Passed 4 tests

An overview of server-side resources used by Snow Flakes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0826.45 ▼14.75
Dashboard /wp-admin3.33 ▲0.0250.43 ▼3.19
Posts /wp-admin/edit.php3.38 ▲0.0246.71 ▼7.27
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.71 ▼12.83
Media Library /wp-admin/upload.php3.25 ▲0.0237.15 ▼3.80
Snow Flakes /wp-admin/options-general.php?page=snow-flakes3.1825.11

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Snow Flakes: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲9313.41 ▼0.958.92 ▲6.5543.60 ▼3.67
Dashboard /wp-admin2,196 ▲165.56 ▼0.0590.85 ▲1.8937.30 ▼2.08
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0536.79 ▼0.3329.41 ▼6.67
Add New Post /wp-admin/post-new.php1,536 ▲823.02 ▲0.09656.59 ▼33.6855.75 ▼2.98
Media Library /wp-admin/upload.php1,407 ▲104.20 ▲0.0297.14 ▼17.4443.07 ▼6.56
Snow Flakes /wp-admin/options-general.php?page=snow-flakes1,3193.4157.5162.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=snow-flakes
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/snow-flakes/includes/admin-menu.php:356
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/snow-flakes/nr-snow-flakes.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: snow, falkes, falling, christmas

snow-flakes/nr-snow-flakes.php 85% from 13 tests

The main PHP file in "Snow Flakes" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("snow-flakes.php" instead of "nr-snow-flakes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin639 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP23726374
JavaScript5915159
PO File1273084
CSS22622

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin