78% aviation-weather-from-noaa

Code Review | Aviation Weather from NOAA

WordPress plugin Aviation Weather from NOAA scored78%from 54 tests.

About plugin

  • Plugin page: aviation-weather-...
  • Plugin version: 0.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2013
  • Latest release: Oct 31, 2022
  • Number of updates: 66
  • Update frequency: every 50.3 days
  • Top authors: machouinard (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /5,864 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼7.79ms] Passed 4 tests

Server-side resources used by Aviation Weather from NOAA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2524.95 ▼15.27
Dashboard /wp-admin3.64 ▲0.3446.76 ▼4.75
Posts /wp-admin/edit.php3.69 ▲0.3449.86 ▲2.18
Add New Post /wp-admin/post-new.php6.18 ▲0.2986.75 ▼13.30
Media Library /wp-admin/upload.php3.50 ▲0.2747.36 ▲14.41
AWFN Logs /wp-admin/tools.php?page=awfn-logs3.4734.11

Server storage [IO: ▲0.73MB] [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: 205 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Aviation Weather from NOAA: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲22614.02 ▼0.366.94 ▲4.7037.05 ▼8.40
Dashboard /wp-admin2,214 ▲265.84 ▲0.9896.71 ▼18.2941.54 ▼1.40
Posts /wp-admin/edit.php2,103 ▲142.04 ▲0.0738.29 ▲0.9335.19 ▲0.76
Add New Post /wp-admin/post-new.php6,363 ▲4,84427.80 ▲4.52916.04 ▲229.0943.77 ▼9.31
Media Library /wp-admin/upload.php1,399 ▲174.22 ▲0.0492.58 ▼8.1140.12 ▼6.83
AWFN Logs /wp-admin/tools.php?page=awfn-logs7882.0423.6831.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_aviation-weather-from-noaa
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/aviation-weather-from-noaa/vendor/sagem-cassiopee/php-metar-decoder/demo/index.php
  • 125× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/aviation-weather-from-noaa/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\StreamHandler' not found in wp-content/plugins/aviation-weather-from-noaa/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'MetarDecoder\\ChunkDecoder\\MetarChunkDecoder' not found in wp-content/plugins/aviation-weather-from-noaa/vendor/sagem-cassiopee/php-metar-decoder/src/ChunkDecoder/ReportStatusChunkDecoder.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Handler\\HandlerInterface' not found in wp-content/plugins/aviation-weather-from-noaa/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php:34
    • > PHP Fatal error
      require_once(): Failed opening required 'PLUGIN_ROOTvendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/aviation-weather-from-noaa/classes/class-awfn-metar.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'MetarDecoder\\ChunkDecoder\\MetarChunkDecoder' not found in wp-content/plugins/aviation-weather-from-noaa/vendor/sagem-cassiopee/php-metar-decoder/src/ChunkDecoder/TemperatureChunkDecoder.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/aviation-weather-from-noaa/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/aviation-weather-from-noaa/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/aviation-weather-from-noaa/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/aviation-weather-from-noaa/vendor/sagem-cassiopee/php-metar-decoder/tests/Entity/ValueTest.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: pireps, metar, weather, noaa, aviation

aviation-weather-from-noaa/aviation-weather-from-noaa.php 85% from 13 tests

The main PHP file in "Aviation Weather from NOAA" ver. 0.7.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Git Repository: A Git repository was detected inside this plugin

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
Success! There were no dangerous files found in this plugin12,182 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.07
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
▷ Abstract classes96.12%
▷ Concrete classes13893.88%
▷ Final classes00.00%
▷ Static methods555.96%
▷ Public methods69675.41%
▷ Protected methods16317.66%
▷ Private methods646.93%
▷ Named functions29.52%
▷ Anonymous functions1990.48%
▷ Global constants45.80%
▷ Class constants6594.20%
▷ Public constants65100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin