10% taf-widget

Code Review | TAF plugin

WordPress plugin TAF plugin scored 10% from 54 tests.

About plugin

  • Plugin page: taf-widget
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.0
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Sep 10, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mcantsin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 860 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/taf-widget/taf-widget.php+62
    Use of undefined constant register_tafwidget - assumed 'register_tafwidget' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.05ms] Passed 4 tests

Analyzing server-side resources used by TAF plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.11 ▼36.15
Dashboard /wp-admin2.05 ▼1.265.23 ▼45.96
Posts /wp-admin/edit.php2.05 ▼1.315.89 ▼42.14
Add New Post /wp-admin/post-new.php2.05 ▼3.846.20 ▼87.93
Media Library /wp-admin/upload.php2.05 ▼1.185.71 ▼27.85

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_taf_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for TAF plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼0.991.60 ▼0.1239.77 ▼5.36
Dashboard /wp-admin2,206 ▲154.86 ▼1.04106.70 ▼4.2638.98 ▼5.56
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0236.29 ▼0.3734.26 ▼1.09
Add New Post /wp-admin/post-new.php1,535 ▲1523.31 ▲0.37648.25 ▼0.9860.94 ▲4.20
Media Library /wp-admin/upload.php1,388 ▲64.17 ▼0.0795.25 ▼3.5242.73 ▼6.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/taf-widget/taf-widget.php+62
    Use of undefined constant register_tafwidget - assumed 'register_tafwidget' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_taf_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/taf-widget/taf-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
Attributes that require attention:
  • Screenshots: Screenshot #1 (Screenshot of placed taf-widget on Cambodia vACC website) image required
The official readme.txt might help

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

The main file in "TAF plugin" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
109 characters long description:
Plugin to include the latest TAF (Terminal aerodrome forecast) information from NOAA database for any Airport

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin44 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191044

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.26MB with 0.17MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png270.15KB94.64KB▼ 64.97%