10% weather-in-japan

Code Review | Weather in Japan

WordPress plugin Weather in Japan scored10%from 54 tests.

About plugin

  • Plugin page: weather-in-japan
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 18, 2017
  • Latest release: Sep 7, 2020
  • Number of updates: 42
  • Update frequency: every 25.1 days
  • Top authors: ishikawa67 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /4,454 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/weather-in-japan/weather-in-japan.php+36
    Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)`

Server metrics [RAM: ▼1.93MB] [CPU: ▼59.28ms] Passed 4 tests

A check of server-side resources used by Weather in Japan
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.51 ▼31.97
Dashboard /wp-admin2.09 ▼1.266.52 ▼59.57
Posts /wp-admin/edit.php2.09 ▼1.276.12 ▼45.67
Add New Post /wp-admin/post-new.php2.09 ▼3.806.43 ▼99.92
Media Library /wp-admin/upload.php2.09 ▼1.145.68 ▼29.06

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

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

Browser metrics Passed 4 tests

Weather in Japan: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.13 ▼1.456.47 ▲4.4541.81 ▼3.61
Dashboard /wp-admin2,221 ▲185.88 ▲0.99105.62 ▼5.3741.33 ▲0.28
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0039.81 ▲1.1735.17 ▲0.63
Add New Post /wp-admin/post-new.php1,545 ▲1423.10 ▼0.20659.00 ▼26.3750.57 ▼3.25
Media Library /wp-admin/upload.php1,403 ▲64.22 ▲0.0199.53 ▼5.5646.02 ▼1.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/weather-in-japan/weather-in-japan.php+36
    Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)`
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_weatherwidget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: forecast, weather, tenki

weather-in-japan/weather-in-japan.php Passed 13 tests

The main file in "Weather in Japan" v. 1.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
51 characters long description:
日本各地の天気を表示するプラグイン

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin388 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34221331
CSS115057

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin