78% weather-jnm

Code Review | Weather-JNM

WordPress plugin Weather-JNM scored78%from 54 tests.

About plugin

  • Plugin page: weather-jnm
  • Plugin version: 1.0.0.1
  • PHP compatiblity: 5.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.1-5.4.1
  • WordPress version: 6.3.1
  • First release: May 27, 2020
  • Latest release: May 28, 2020
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: jnmsol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /414 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.13ms] Passed 4 tests

An overview of server-side resources used by Weather-JNM
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0839.79 ▼3.41
Dashboard /wp-admin3.44 ▲0.0949.72 ▼1.17
Posts /wp-admin/edit.php3.55 ▲0.1550.40 ▲3.40
Add New Post /wp-admin/post-new.php6.02 ▲0.0985.47 ▼18.51
Media Library /wp-admin/upload.php3.36 ▲0.0940.17 ▲2.58
Weather-JNM /wp-admin/options-general.php?page=jnmweather-admin-settings3.3333.61

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_wjnm_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Weather-JNM
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.74 ▲0.451.80 ▲0.0242.07 ▼1.37
Dashboard /wp-admin2,199 ▲225.63 ▼0.0391.39 ▲2.7438.32 ▼0.89
Posts /wp-admin/edit.php2,107 ▲71.99 ▲0.0438.05 ▼2.6935.14 ▲0.61
Add New Post /wp-admin/post-new.php1,532 ▼623.22 ▲5.15628.03 ▼22.2044.42 ▼27.12
Media Library /wp-admin/upload.php1,398 ▼24.21 ▼0.0596.84 ▼12.9942.63 ▼1.93
Weather-JNM /wp-admin/options-general.php?page=jnmweather-admin-settings9542.0024.0629.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_wjnm_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/weather-jnm/jnmsol-weather.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/weather-jnm/jnmsol-weather-settings.php:410

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: weather

weather-jnm/jnmsol-weather.php 92% from 13 tests

This is the main PHP file of "Weather-JNM" version 1.0.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("weather-jnm.php" instead of "jnmsol-weather.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin559 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP295134420
CSS12021139

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity26.00
▷ Minimum class complexity18.00
▷ Maximum class complexity34.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.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

All PNG images should be compressed to minimize bandwidth usage for end users
19 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
JNMweatherIcons/11d.png2.78KB1.85KB▼ 33.47%
JNMweatherIcons/03d.png0.82KB0.80KB▼ 1.67%
JNMweatherIcons/02d.png1.59KB1.54KB▼ 3.26%
JNMweatherIcons/11n.png2.78KB1.85KB▼ 33.47%
JNMweatherIcons/04n.png1.83KB1.60KB▼ 12.47%