10% aviationweather-widget

Code Review | AviationWeather Plugin

WordPress plugin AviationWeather Plugin scored10%from 54 tests.

About plugin

  • Plugin page: aviationweather-w...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Dec 13, 2012
  • Latest release: Dec 14, 2012
  • Number of updates: 16
  • Update frequency: every 0.1 days
  • Top authors: alessiobravi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,263 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/aviationweather-widget/aviationweather-widget.php+108
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.12ms] Passed 4 tests

Server-side resources used by AviationWeather Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.393.87 ▼32.80
Dashboard /wp-admin2.10 ▼1.216.03 ▼38.09
Posts /wp-admin/edit.php2.10 ▼1.264.73 ▼48.35
Add New Post /wp-admin/post-new.php2.10 ▼3.795.94 ▼89.22
Media Library /wp-admin/upload.php2.10 ▼1.135.30 ▼29.51

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_aviationweather-widget
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by AviationWeather Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.481.81 ▲0.2038.88 ▼5.40
Dashboard /wp-admin2,195 ▲155.55 ▼0.1283.63 ▼3.7343.52 ▲2.10
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.1036.16 ▼3.1731.66 ▼1.79
Add New Post /wp-admin/post-new.php1,528 ▲223.16 ▼0.25604.53 ▲0.0349.13 ▼18.19
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.0197.95 ▼0.6842.58 ▼1.13

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
    • > Deprecated in wp-content/plugins/aviationweather-widget/aviationweather-widget.php+108
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_aviationweather-widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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
Everything seems fine, however this is by no means 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/aviationweather-widget/aviationweather-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (ScreenShot of placed aviationweather-widget on a WordPress powered WebSite. (Widget Output.jpg)), #2 (ScreenShot of the admin configuration panel. (Admin Panel.jpg))
You can look at the official readme.txt

aviationweather-widget/aviationweather-widget.php Passed 13 tests

The entry point to "AviationWeather Plugin" version 1.1 is a PHP file that has certain tags in its header comment area
95 characters long description:
Plugin to show the latest METAR and TAF information from AviationWeather.org for any ICAO Code.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected90 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112990

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ 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%
Functions0
▷ Named functions00.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