83% pflegekorb-open-weather

Code Review | Location Weather

WordPress plugin Location Weather scored83%from 54 tests.

About plugin

  • Plugin page: pflegekorb-open-w...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 12, 2019
  • Latest release: Jun 13, 2019
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: andreygikavchuk13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /811 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.04ms] Passed 4 tests

Server-side resources used by Location Weather
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.85 ▼1.65
Dashboard /wp-admin3.34 ▼0.0045.75 ▼12.09
Posts /wp-admin/edit.php3.39 ▲0.0346.21 ▲2.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.78 ▼6.17
Media Library /wp-admin/upload.php3.26 ▲0.0333.17 ▼0.23

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_open_weather_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Location Weather
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.81 ▼0.571.72 ▲0.0639.46 ▼0.22
Dashboard /wp-admin2,209 ▲175.85 ▲0.88115.40 ▲10.1939.12 ▼4.12
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0141.43 ▲5.5834.94 ▼0.12
Add New Post /wp-admin/post-new.php1,514 ▼017.85 ▲0.38684.88 ▲23.8653.96 ▼0.36
Media Library /wp-admin/upload.php1,391 ▲64.19 ▼0.2095.64 ▼7.3343.76 ▲0.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_open_weather_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/pflegekorb-open-weather/simple-open-weather-widget.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/pflegekorb-open-weather/simple-open-weather-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pflegekorb-open-weather/inc/widget.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (Widget) image missing
  • Tags: Too many tags (31 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

pflegekorb-open-weather/simple-open-weather-widget.php 92% from 13 tests

The main PHP script in "Location Weather" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pflegekorb-open-weather.php" instead of "simple-open-weather-widget.php")

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
There were no executable files found in this plugin131 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32614109
CSS10022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
widget.png32.88KB9.79KB▼ 70.22%