83% corona-virus-covid-19-visualizations

Code Review | Corona Virus (COVID-19) - Live Report Visualizations in WordPress

WordPress plugin Corona Virus (COVID-19) - Live Report Visualizations in WordPress scored 83% from 54 tests.

About plugin

  • Plugin page: corona-virus-covi...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: May 1, 2020
  • Latest release: Mar 2, 2023
  • Number of updates: 57
  • Update frequency: every 18.2 days
  • Top authors: grandplugin (91.23%)wpqode (8.77%)frohadpro (3.51%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 2,457 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.07ms] Passed 4 tests

Server-side resources used by Corona Virus (COVID-19) - Live Report Visualizations in WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.45 ▼1.56
Dashboard /wp-admin3.31 ▲0.0145.88 ▼10.02
Posts /wp-admin/edit.php3.36 ▲0.0143.97 ▼4.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.00 ▼0.11
Media Library /wp-admin/upload.php3.23 ▲0.0033.01 ▲0.59

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Corona Virus (COVID-19) - Live Report Visualizations in WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.22 ▼1.221.63 ▼0.0645.99 ▲0.19
Dashboard /wp-admin2,221 ▲335.86 ▼0.05109.27 ▲12.8441.98 ▼4.92
Posts /wp-admin/edit.php2,101 ▲152.05 ▲0.0537.17 ▼1.3635.32 ▼5.22
Add New Post /wp-admin/post-new.php1,530 ▲1623.21 ▲5.65643.68 ▼35.4858.84 ▲3.51
Media Library /wp-admin/upload.php1,400 ▲94.18 ▼0.0194.01 ▼6.8241.09 ▼3.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 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/corona-virus-covid-19-visualizations/covid19-visualizations.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
5 plugin tags: coronavirus, corona, covid19, virus, covid

corona-virus-covid-19-visualizations/covid19-visualizations.php 77% from 13 tests

"Corona Virus (COVID-19) - Live Report Visualizations in WordPress" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 ("corona-virus-covid-19-visualizations.php" instead of "covid19-visualizations.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin122 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12442122

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
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
6 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/screenshot-1.png32.67KB13.43KB▼ 58.91%
img/screenshot-5.png28.49KB13.82KB▼ 51.48%
img/screenshot-2.png38.90KB17.93KB▼ 53.92%
img/screenshot-3.png22.60KB11.37KB▼ 49.69%
img/screenshot-4.png13.56KB6.75KB▼ 50.22%