10% metar-widget

Code Review | METAR plugin

WordPress plugin METAR plugin scored10%from 54 tests.

About plugin

  • Plugin page: metar-widget
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4.1
  • WordPress version: 6.3.1
  • First release: Aug 8, 2012
  • Latest release: Oct 26, 2012
  • Number of updates: 14
  • Update frequency: every 5.4 days
  • Top authors: mcantsin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,052 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/metar-widget/metar-widget.php+62
    Use of undefined constant register_metarwidget - assumed 'register_metarwidget' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.93MB] [CPU: ▼51.75ms] Passed 4 tests

This is a short check of server-side resources used by METAR plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.408.79 ▼34.74
Dashboard /wp-admin2.08 ▼1.234.91 ▼43.65
Posts /wp-admin/edit.php2.08 ▼1.286.74 ▼40.93
Add New Post /wp-admin/post-new.php2.08 ▼3.815.46 ▼87.67
Media Library /wp-admin/upload.php2.08 ▼1.155.84 ▼29.78

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_metar_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for METAR plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼0.931.67 ▼0.2138.93 ▼11.72
Dashboard /wp-admin2,206 ▲185.85 ▲0.0399.72 ▼4.4741.31 ▲1.22
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0139.91 ▲2.1134.00 ▼4.41
Add New Post /wp-admin/post-new.php1,542 ▼018.53 ▲0.39612.32 ▲0.4254.51 ▲0.28
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.1093.10 ▼12.2441.38 ▲0.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/metar-widget/metar-widget.php+62
    Use of undefined constant register_metarwidget - assumed 'register_metarwidget' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_metar_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/metar-widget/metar-widget.php:12

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Screenshot of placed metar-widget on Cambodia vACC website) image required
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "METAR plugin" version 0.1
81 characters long description:
Plugin to include the latest METAR information from NOAA database for any Airport

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected44 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191044

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png113.61KB40.86KB▼ 64.03%