84% is-it-snowing

Code Review | Is it Snowing?

WordPress plugin Is it Snowing? scored84%from 54 tests.

About plugin

  • Plugin page: is-it-snowing
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2017
  • Latest release: Dec 14, 2017
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: gluten (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

A check of server-side resources used by Is it Snowing?
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.26 ▼1.41
Dashboard /wp-admin3.38 ▲0.0857.71 ▲6.47
Posts /wp-admin/edit.php3.49 ▲0.1454.72 ▲4.89
Add New Post /wp-admin/post-new.php5.96 ▲0.0787.52 ▼11.72
Media Library /wp-admin/upload.php3.30 ▲0.0736.28 ▲0.35
Is it Snowing? /wp-admin/options-general.php?page=is_it_snowing3.2732.55

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

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

Browser metrics Passed 4 tests

Is it Snowing?: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.79 ▲0.411.86 ▲0.0842.48 ▼3.71
Dashboard /wp-admin2,228 ▲225.91 ▲1.0299.03 ▼8.2142.33 ▼2.89
Posts /wp-admin/edit.php2,107 ▲72.05 ▲0.0335.41 ▼2.3931.27 ▼4.85
Add New Post /wp-admin/post-new.php1,562 ▲3618.19 ▲0.28638.62 ▼42.5655.81 ▼4.98
Media Library /wp-admin/upload.php1,398 ▼24.23 ▲0.0596.44 ▼24.6841.89 ▼6.04
Is it Snowing? /wp-admin/options-general.php?page=is_it_snowing8752.0627.9728.14

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function belabor\\is_it_snowing\\admin_url() in wp-content/plugins/is-it-snowing/includes/class-plugin-options.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/is-it-snowing/is-it-snowing.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function belabor\\is_it_snowing\\add_action() in wp-content/plugins/is-it-snowing/includes/class-assets-controller.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
1 plugin tags: snow

is-it-snowing/is-it-snowing.php 92% from 13 tests

The main PHP script in "Is it Snowing?" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin274 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP494120247
JavaScript26927

PHP code Passed 2 tests

A short 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.18
Average class complexity7.33
▷ Minimum class complexity4.00
▷ Maximum class complexity12.00
Average method complexity1.66
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods310.34%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin