10% volcano-widget

Code Review | Volcano Widget

WordPress plugin Volcano Widget scored 10% from 54 tests.

About plugin

  • Plugin page: volcano-widget
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Dec 14, 2012
  • Latest release: Jun 2, 2016
  • Number of updates: 18
  • Update frequency: every 70.3 days
  • Top authors: volcanodiscovery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,658 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/volcano-widget/VolcanoWidget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; VolcanoWidget has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼53.11ms] Passed 4 tests

An overview of server-side resources used by Volcano Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.354.99 ▼40.85
Dashboard /wp-admin2.13 ▼1.186.37 ▼42.72
Posts /wp-admin/edit.php2.13 ▼1.237.55 ▼38.09
Add New Post /wp-admin/post-new.php2.13 ▼3.766.16 ▼90.76
Media Library /wp-admin/upload.php2.13 ▼1.105.11 ▼29.66
Volcano Widget /wp-admin/options-general.php?page=VolcanoWidget2.136.76

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 8 new options
New WordPress options
widget_volcanowidget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
volcano_widget_data

Browser metrics Passed 4 tests

A check of browser resources used by Volcano Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.28 ▼1.094.23 ▲1.9742.56 ▼5.81
Dashboard /wp-admin2,204 ▲135.84 ▲0.96112.75 ▼7.9439.23 ▼4.67
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0640.16 ▲0.2935.78 ▲3.61
Add New Post /wp-admin/post-new.php1,536 ▼623.11 ▲4.79674.16 ▲31.0749.68 ▼20.95
Media Library /wp-admin/upload.php1,395 ▲104.21 ▼0.0595.49 ▼9.5044.80 ▼1.46
Volcano Widget /wp-admin/options-general.php?page=VolcanoWidget15,01716.31585.4271.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/volcano-widget/VolcanoWidget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; VolcanoWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_volcanowidget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=VolcanoWidget
    • > Deprecated in wp-content/plugins/volcano-widget/VolcanoWidget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; VolcanoWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=VolcanoWidget
    • > Deprecated in wp-content/plugins/volcano-widget/VolcanoWidget.php+70
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=VolcanoWidget
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in VolcanoWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=VolcanoWidget
    • > Notice in wp-content/plugins/volcano-widget/VolcanoWidget.php+180
    Undefined index: lon1
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=VolcanoWidget
    • > Notice in wp-content/plugins/volcano-widget/VolcanoWidget.php+181
    Undefined index: lon2
    • > GET request to /wp-admin/options-general.php?page=VolcanoWidget
    • > Notice in wp-content/plugins/volcano-widget/VolcanoWidget.php+181
    Undefined index: lat1

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 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/volcano-widget/VolcanoWidget.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=VolcanoWidget
    • > Other (warning) in unknown
    https://earthquakes.volcanodiscovery.com/ - must have a valid `as` value
    • > GET request to /wp-admin/options-general.php?page=VolcanoWidget
    • > Javascript (severe) in unknown
    https://earthquakes.volcanodiscovery.com/ 277:20 Uncaught DOMException: Blocked a frame with origin "https://earthquakes.v…scovery.com" from accessing a cross-origin frame.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: earthquakes, interactive, widget, volcanoes, worldwide...

volcano-widget/VolcanoWidget.php 92% from 13 tests

The main PHP script in "Volcano Widget" version 1.2.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("volcano-widget.php" instead of "VolcanoWidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected268 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16727268

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon_256x256.png17.20KB11.18KB▼ 35.00%
assets/icon-256x256.png17.20KB11.18KB▼ 35.00%