74% k-weather

Code Review | K-Weather (Korea Weather 대한민국 날씨 위젯)

WordPress plugin K-Weather (Korea Weather 대한민국 날씨 위젯) scored74%from 54 tests.

About plugin

  • Plugin page: k-weather
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4
  • WordPress version: 6.3.1
  • First release: Dec 29, 2014
  • Latest release: Jan 2, 2016
  • Number of updates: 25
  • Update frequency: every 15.0 days
  • Top authors: Youngbin Ko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,749 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼1.67MB] [CPU: ▼50.39ms] Passed 4 tests

A check of server-side resources used by K-Weather (Korea Weather 대한민국 날씨 위젯)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.32 ▼1.1510.98 ▼34.66
Dashboard /wp-admin2.34 ▼0.9713.18 ▼43.80
Posts /wp-admin/edit.php2.34 ▼1.0311.48 ▼38.37
Add New Post /wp-admin/post-new.php2.34 ▼3.5612.76 ▼84.72
Media Library /wp-admin/upload.php2.34 ▼0.9012.26 ▼24.03

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_kweather_widget
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for K-Weather (Korea Weather 대한민국 날씨 위젯)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.24 ▲0.051.94 ▼0.0744.22 ▲0.41
Dashboard /wp-admin2,195 ▲185.57 ▼0.0386.90 ▼16.5341.34 ▼0.89
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0035.80 ▲1.0534.64 ▲1.17
Add New Post /wp-admin/post-new.php1,526 ▼423.08 ▲0.07687.37 ▲24.4356.41 ▲0.76
Media Library /wp-admin/upload.php1,397 ▼34.10 ▼0.15112.36 ▲4.3447.78 ▲3.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in KWeather_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_kweather_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/k-weather/k-weather.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === k-weather === )
  • Screenshots: These screenshots do not have images: #1 (사이드바에 나타나는 위젯 적용화면), #2 (위젯 설정 화면), #3 (위젯 설정하기 #1), #4 (Custom CSS 설정하기. changelog 1.1.2 부분을 참고하세요.)
The official readme.txt is a good inspiration

k-weather/k-weather.php Passed 13 tests

The principal PHP file in "K-Weather (Korea Weather 대한민국 날씨 위젯)" v. 1.1.3 is loaded by WordPress automatically on each request
84 characters long description:
기상청에서 날씨를 받아와 블로그에 표시하는 플러그인입니다.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,066 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS2045389
LESS31735273
PHP23513195
SVG100153
Markdown318030
JSON10026

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity12.00
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin