93% interactive-hail-reports-heat-map

Code Review | Hail Reports Heatmap

WordPress plugin Hail Reports Heatmap scored 93% from 54 tests.

About plugin

  • Plugin page: interactive-hail-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-3.4
  • WordPress version: 5.8.1
  • First release: Oct 22, 2012
  • Latest release: Oct 22, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ihmblh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 884 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼142.85ms] Passed 4 tests

A check of server-side resources used by Hail Reports Heatmap
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0137.56 ▲1.93
Dashboard /wp-admin3.07 ▲0.0147.84 ▲8.22
Posts /wp-admin/edit.php3.12 ▲0.0134.07 ▼16.85
Add New Post /wp-admin/post-new.php5.42 ▼0.0193.79 ▼559.83
Media Library /wp-admin/upload.php3.01 ▲0.0138.81 ▲3.36

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Hail Reports Heatmap
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,710 ▲11416.38 ▲0.4917.34 ▲7.8648.22 ▼4.89
Dashboard /wp-admin2,970 ▲395.84 ▼0.03148.18 ▼1.29113.92 ▼6.17
Posts /wp-admin/edit.php2,736 ▼32.70 ▲0.0265.37 ▼8.9195.98 ▼7.39
Add New Post /wp-admin/post-new.php1,683 ▼018.55 ▼0.17386.42 ▼13.29118.22 ▲0.98
Media Library /wp-admin/upload.php1,807 ▼35.00 ▼0.01159.85 ▲4.85125.88 ▼1.96

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/interactive-hail-reports-heat-map/main.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === interactive-hail-reports-heat-map === )
  • Screenshots: These screenshots do not have images: #1 (Example of the Hail Map centered on St. Louis, MO from the hail storm that hit on April 28th, 2012, default zoom level for a city/state (8). Short code: [hailmap date="4/28/2012" state="mo" city="saint louis"]), #2 (Example of the Hail Map centered on Dallas, TX from June 13, 2012, zoom level 9, hidedatenavigator. Short code: [hailmap date="6/13/2012" state="tx" city="dallas" zoom="9" hidedatenavigator="yes"]), #3 (Example of the Hail Map not centered on any city for the hail storms of July 1, 2012. Short code: [hailmap date="7/1/20-12"])
The official readme.txt might help

interactive-hail-reports-heat-map/main.php 85% from 13 tests

The main PHP file in "Hail Reports Heatmap" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("interactive-hail-reports-heat-map.php" instead of "main.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 283 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin407 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS1111378
PHP17829

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.66MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png240.86KB82.24KB▼ 65.86%
images/ui-navbar-horizontal-16x50.png0.27KB0.35KB0.00%
screenshot-3.png229.21KB78.14KB▼ 65.91%
images/glyphicons-halflings.png13.50KB10.35KB▼ 23.34%
screenshot-1.png187.04KB62.95KB▼ 66.34%