10% live-widget-luftdaten

Code Review | Luftdaten Live Widget

WordPress plugin Luftdaten Live Widget scored10%from 54 tests.

About plugin

  • Plugin page: live-widget-luftd...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 6, 2017
  • Latest release: Mar 23, 2023
  • Number of updates: 17
  • Update frequency: every 128.1 days
  • Top authors: bleeptrack (76.47%)slowhandasg (29.41%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /1,929 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/live-widget-luftdaten/live-widget-luftdaten.php+459
    Methods with the same name as their class will not be constructors in a future version of PHP; Sensor has a deprecated constructor

Server metrics [RAM: ▼1.77MB] [CPU: ▼53.24ms] Passed 4 tests

This is a short check of server-side resources used by Luftdaten Live Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.244.75 ▼35.29
Dashboard /wp-admin2.24 ▼1.066.01 ▼44.31
Posts /wp-admin/edit.php2.24 ▼1.116.00 ▼44.36
Add New Post /wp-admin/post-new.php2.24 ▼3.646.38 ▼89.01
Media Library /wp-admin/upload.php2.24 ▼0.995.43 ▼31.52

Server storage [IO: ▲0.02MB] [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: 2 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_luftdatenampel
widget_recent-posts
theysaidso_admin_options
widget_luftdatenwidget

Browser metrics Passed 4 tests

Checking browser requirements for Luftdaten Live Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.131.71 ▼0.2339.77 ▼8.48
Dashboard /wp-admin2,206 ▲174.88 ▼0.10107.72 ▼2.0341.08 ▼1.65
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0540.00 ▼2.1437.63 ▲0.36
Add New Post /wp-admin/post-new.php1,519 ▲523.09 ▲5.42622.85 ▲5.7360.19 ▲11.62
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0298.80 ▼0.8241.31 ▼2.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/live-widget-luftdaten/live-widget-luftdaten.php+459
    Methods with the same name as their class will not be constructors in a future version of PHP; Sensor has a deprecated constructor
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_luftdatenwidget
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_luftdatenampel
    • widget_recent-comments

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
Good news, no errors were detected

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/live-widget-luftdaten/live-widget-luftdaten.php:16

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: widget, environmental data, live, sensor

live-widget-luftdaten/live-widget-luftdaten.php 85% from 13 tests

The main PHP file in "Luftdaten Live Widget" ver. 1.4.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.0" instead of "7.2")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0" instead of "5.2")

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 plugin439 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP118650439

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity23.33
▷ Minimum class complexity6.00
▷ Maximum class complexity40.00
Average method complexity4.72
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin