84% covid-19-corona-virus-report

Code Review | Covid-19 Corona Virus Report

WordPress plugin Covid-19 Corona Virus Report scored84%from 54 tests.

About plugin

  • Plugin page: covid-19-corona-v...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Dec 11, 2021
  • Number of updates: 9
  • Update frequency: every 68.1 days
  • Top authors: kinjaldalwadi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /959 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Covid-19 Corona Virus Report
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.57 ▼4.02
Dashboard /wp-admin3.31 ▲0.0043.00 ▼4.71
Posts /wp-admin/edit.php3.36 ▲0.0044.13 ▼6.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.17 ▼10.99
Media Library /wp-admin/upload.php3.23 ▲0.0035.81 ▲3.65

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Covid-19 Corona Virus Report: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲15514.11 ▼0.248.29 ▲6.4440.14 ▼4.62
Dashboard /wp-admin2,206 ▲185.77 ▲0.87113.88 ▲4.1342.28 ▲0.23
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0238.79 ▼0.9829.44 ▼8.72
Add New Post /wp-admin/post-new.php1,514 ▼1917.54 ▼5.89683.77 ▲10.2050.21 ▼4.20
Media Library /wp-admin/upload.php1,391 ▼04.24 ▲0.0899.42 ▼5.9843.84 ▼0.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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 everything seems fine, this is not an exhaustive test

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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/covid-19-corona-virus-report/covid19-corona-virus-reports.php:61

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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 require attention: The official readme.txt is a good inspiration

covid-19-corona-virus-report/covid19-corona-virus-reports.php 92% from 13 tests

"Covid-19 Corona Virus Report" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("covid-19-corona-virus-report.php" instead of "covid19-corona-virus-reports.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected263 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3315198
PHP221063
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sort_asc.png0.16KB0.25KB0.00%
images/sort_desc.png0.15KB0.25KB0.00%
images/sort_asc (1).png0.16KB0.25KB0.00%
images/sort_both.png0.20KB0.29KB0.00%
images/sort_desc_disabled.png0.14KB0.25KB0.00%