10% airliners-widget

Code Review | Airliners Widget

WordPress plugin Airliners Widget scored10%from 54 tests.

About plugin

  • Plugin page: airliners-widget
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 4, 2013
  • Latest release: Jun 9, 2015
  • Number of updates: 13
  • Update frequency: every 56.8 days
  • Top authors: sierramike (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,542 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/airliners-widget/airliners-widget.php+37
    Methods with the same name as their class will not be constructors in a future version of PHP; airliners_widget_Widget has a deprecated constructor

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

A check of server-side resources used by Airliners Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.397.66 ▼32.88
Dashboard /wp-admin2.10 ▼1.214.73 ▼41.77
Posts /wp-admin/edit.php2.10 ▼1.266.17 ▼36.92
Add New Post /wp-admin/post-new.php2.10 ▼3.795.27 ▼94.69
Media Library /wp-admin/upload.php2.10 ▼1.135.74 ▼25.83

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Airliners Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.26 ▼1.331.70 ▲0.0136.25 ▼7.24
Dashboard /wp-admin2,208 ▲234.87 ▼1.00115.26 ▲12.9943.01 ▼0.04
Posts /wp-admin/edit.php2,091 ▲22.02 ▼0.0134.54 ▼0.2233.93 ▼2.83
Add New Post /wp-admin/post-new.php1,533 ▲1423.42 ▲0.25645.56 ▲33.8848.60 ▼0.89
Media Library /wp-admin/upload.php1,393 ▲54.20 ▲0.0197.41 ▼10.9040.47 ▼6.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/airliners-widget/airliners-widget.php+37
    Methods with the same name as their class will not be constructors in a future version of PHP; airliners_widget_Widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_airliners_widget
    • widget_recent-posts
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 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/airliners-widget/airliners-widget.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: image, aviation, picture, airliners, widget

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

The primary PHP file in "Airliners Widget" version 1.1.1 is used by WordPress to initiate all plugin functionality
123 characters long description:
Displays an Airliners.net picture (Random, Top Of Yesterday, or specific picture by ID) using official Airliners.net script

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
Good job! No executable or dangerous file extensions detected170 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File2141487

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin