83% virusweather

Code Review | VirusWeather Covid-19 Coronavirus

WordPress plugin VirusWeather Covid-19 Coronavirus scored83%from 54 tests.

About plugin

  • Plugin page: virusweather
  • Plugin version: 2.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.3-5.5.1
  • WordPress version: 6.3.1
  • First release: May 14, 2020
  • Latest release: Oct 16, 2020
  • Number of updates: 55
  • Update frequency: every 2.8 days
  • Top authors: singer22 wordpress (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /4,686 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.31ms] Passed 4 tests

An overview of server-side resources used by VirusWeather Covid-19 Coronavirus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1537.00 ▼2.26
Dashboard /wp-admin3.45 ▲0.1445.66 ▲0.41
Posts /wp-admin/edit.php3.56 ▲0.2043.82 ▼2.11
Add New Post /wp-admin/post-new.php6.05 ▲0.1685.16 ▼8.46
Media Library /wp-admin/upload.php3.37 ▲0.1436.67 ▼0.39

Server storage [IO: ▲7.50MB] [DB: ▲0.07MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/virusweather/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/virusweather/admin/images/W_logo_20\321\20520.png"
Filesystem: 105 new files
Database: no new tables, 7 new options
New WordPress options
widget_virus_weather_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by VirusWeather Covid-19 Coronavirus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.52 ▲0.241.52 ▼0.1741.85 ▼3.17
Dashboard /wp-admin2,197 ▲176.82 ▲1.2296.03 ▲7.3193.48 ▲54.88
Posts /wp-admin/edit.php2,120 ▲203.40 ▲1.4642.78 ▲3.1831.28 ▼7.85
Add New Post /wp-admin/post-new.php1,542 ▲1424.20 ▲1.10662.15 ▲22.0434.47 ▼13.04
Media Library /wp-admin/upload.php1,411 ▲116.28 ▲2.06108.14 ▲9.3767.05 ▲25.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_virus_weather_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/virusweather/includes/class-virus-weather.php:202

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (22 tag instead of maximum 10)
You can take inspiration from this readme.txt

virusweather/virus-weather.php 77% from 13 tests

The entry point to "VirusWeather Covid-19 Coronavirus" version 2.0.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("virusweather.php" instead of "virus-weather.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 370 characters long)

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
There were no executable files found in this plugin2,320 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
SVG909789
PHP8172414573
JavaScript212123569
CSS1794389

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity7.14
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1982.61%
▷ Protected methods00.00%
▷ Private methods417.39%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
56 PNG files occupy 1.84MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/ico_size_300x400_g.png3.36KB1.08KB▼ 67.87%
admin/images/instagram.png0.56KB0.55KB▼ 2.08%
admin/images/21.png0.20KB0.19KB▼ 2.50%
admin/images/armenia-outbreak-hotspot-may-20-2020.png61.40KB27.69KB▼ 54.90%
admin/images/logo.png2.84KB2.75KB▼ 3.17%