10% tornado-warnings

Code Review | Wordpress Tornado Warnings

WordPress plugin Wordpress Tornado Warnings scored10%from 54 tests.

About plugin

  • Plugin page: tornado-warnings
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Nov 14, 2012
  • Latest release: Dec 13, 2012
  • Number of updates: 16
  • Update frequency: every 1.8 days
  • Top authors: ZestyLabs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,644 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 validation failed for this plugin
    • > Deprecated in wp-content/plugins/tornado-warnings/index.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Tornado_Warning_Widget has a deprecated constructor

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

This is a short check of server-side resources used by Wordpress Tornado Warnings
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.04 ▼41.31
Dashboard /wp-admin2.08 ▼1.236.01 ▼50.23
Posts /wp-admin/edit.php2.08 ▼1.285.93 ▼47.73
Add New Post /wp-admin/post-new.php2.08 ▼3.816.25 ▼87.64
Media Library /wp-admin/upload.php2.08 ▼1.156.06 ▼28.75
Tornado Warnings /wp-admin/options-general.php?page=wp_torando_warnings2.085.32

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_mesodiscussions
db_upgraded
widget_tornado_warnings
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Wordpress Tornado Warnings: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.74 ▲0.331.60 ▼0.0543.15 ▼3.62
Dashboard /wp-admin2,199 ▲285.51 ▼0.1685.49 ▼14.4939.64 ▼3.65
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0340.50 ▲1.6136.15 ▲1.86
Add New Post /wp-admin/post-new.php1,531 ▲522.98 ▼0.06625.16 ▼60.8060.81 ▲9.82
Media Library /wp-admin/upload.php1,407 ▲104.23 ▼0.0097.82 ▼6.4546.20 ▲0.19
Tornado Warnings /wp-admin/options-general.php?page=wp_torando_warnings7601.9925.2929.69

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
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/tornado-warnings/index.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Tornado_Warning_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_tornado_warnings
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_mesodiscussions
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp_torando_warnings
    • > Deprecated in wp-content/plugins/tornado-warnings/index.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Tornado_Warning_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp_torando_warnings
    • > Deprecated in wp-content/plugins/tornado-warnings/index.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Mesodiscussions_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp_torando_warnings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WP_Tornado_Warning_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=wp_torando_warnings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WP_Mesodiscussions_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=wp_torando_warnings
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_tornado_warnings_options' not found or invalid function name

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tornado-warnings/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (The Widget As It Appears in A Wordpress Blog), #2 (The Widget in the Widgets Menu), #3 (A list of tornado warnings on a widget on a site.)
  • Screenshots: Please add descriptions for these screenshots #0, #0 in tornado-warnings/assets to your readme.txt
The official readme.txt might help

tornado-warnings/index.php 92% from 13 tests

The main file in "Wordpress Tornado Warnings" v. 0.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tornado-warnings.php" instead of "index.php")

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

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin