10% wp-taf-metar-widget

Code Review | taf-metar-widget

WordPress plugin taf-metar-widget scored 10% from 54 tests.

About plugin

  • Plugin page: wp-taf-metar-widget
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2016
  • Latest release: Nov 2, 2016
  • Number of updates: 7
  • Update frequency: every 5.7 days
  • Top authors: wptechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,160 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
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wp-taf-metar-widget/WP-TAF-METAR-Widget.php+202
    Use of undefined constant register_WPTafMetarWidget - assumed 'register_WPTafMetarWidget' (this will throw an Error in a future version of PHP)

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

This is a short check of server-side resources used by taf-metar-widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.46 ▼40.08
Dashboard /wp-admin2.10 ▼1.206.52 ▼44.14
Posts /wp-admin/edit.php2.10 ▼1.266.35 ▼41.61
Add New Post /wp-admin/post-new.php2.10 ▼3.796.22 ▼92.69
Media Library /wp-admin/upload.php2.10 ▼1.135.90 ▼30.98

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_wp-taf_metar_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

taf-metar-widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼1.321.74 ▼0.1343.35 ▲0.22
Dashboard /wp-admin2,206 ▲184.89 ▼0.98110.82 ▼8.5943.72 ▲1.50
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0035.52 ▼1.6236.44 ▲1.57
Add New Post /wp-admin/post-new.php1,514 ▼2017.77 ▼5.37690.07 ▲3.9752.33 ▼5.53
Media Library /wp-admin/upload.php1,388 ▲34.19 ▲0.0096.96 ▼3.4244.04 ▼1.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/wp-taf-metar-widget/WP-TAF-METAR-Widget.php+202
    Use of undefined constant register_WPTafMetarWidget - assumed 'register_WPTafMetarWidget' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_wp-taf_metar_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: weather, metar, aviation, taf, widget...

wp-taf-metar-widget/WP-TAF-METAR-Widget.php 92% from 13 tests

"taf-metar-widget" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-taf-metar-widget.php" instead of "WP-TAF-METAR-Widget.php")

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
There were no executable files found in this plugin113 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14946113

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods457.14%
▷ Protected methods00.00%
▷ Private methods342.86%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin