83% corona-covid-19-stats

Code Review | Coronavirus (COVID-19) Live Stats & Updates - Beautiful Graphics, Charts, Wordlwide / Country Stats (USA, Spain, China, Pakistan ...)

WordPress plugin Coronavirus (COVID-19) Live Stats & Updates - Beautiful Graphics, Charts, Wordlwide / Country Stats (USA, Spain, China, Pakistan ...) scored 83% from 54 tests.

About plugin

  • Plugin page: corona-covid-19-s...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.7
  • WordPress version: 6.3.1
  • First release: May 1, 2020
  • Latest release: Mar 11, 2021
  • Number of updates: 13
  • Update frequency: every 24.2 days
  • Top authors: The-Rock (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 3,945 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Coronavirus (COVID-19) Live Stats & Updates - Beautiful Graphics, Charts, Wordlwide / Country Stats (USA, Spain, China, Pakistan ...)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.68 ▼4.47
Dashboard /wp-admin3.32 ▲0.0146.38 ▼4.09
Posts /wp-admin/edit.php3.37 ▲0.0145.06 ▼1.78
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.08 ▼9.15
Media Library /wp-admin/upload.php3.24 ▲0.0135.53 ▲1.59

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Coronavirus (COVID-19) Live Stats & Updates - Beautiful Graphics, Charts, Wordlwide / Country Stats (USA, Spain, China, Pakistan ...): an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲13813.62 ▼0.771.83 ▲0.0943.67 ▲5.05
Dashboard /wp-admin2,251 ▲595.86 ▲0.91101.63 ▼0.7043.99 ▼2.15
Posts /wp-admin/edit.php2,140 ▲512.16 ▲0.1539.22 ▲3.1241.56 ▲6.60
Add New Post /wp-admin/post-new.php1,550 ▲1717.70 ▼5.50665.44 ▼15.6457.59 ▲1.30
Media Library /wp-admin/upload.php1,439 ▲484.27 ▲0.0695.96 ▼9.4447.57 ▲3.09

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • 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 shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 25× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: rand in wp-content/plugins/corona-covid-19-stats/includes/widgets/global-card.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/corona-covid-19-stats/includes/covid-widget.php:85
    • > PHP Notice
      Undefined variable: bgcolor in wp-content/plugins/corona-covid-19-stats/includes/widgets/global-card.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/corona-covid-19-stats/includes/notices.php:39
    • > PHP Notice
      Undefined variable: labelcases in wp-content/plugins/corona-covid-19-stats/includes/widgets/global-card.php on line 3
    • > PHP Notice
      Undefined variable: cases in wp-content/plugins/corona-covid-19-stats/includes/widgets/global-card.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/corona-covid-19-stats/includes/scripts.php:5
    • > PHP Notice
      Undefined variable: recovered in wp-content/plugins/corona-covid-19-stats/includes/widgets/global-card.php on line 3
    • > PHP Notice
      Undefined variable: width in wp-content/plugins/corona-covid-19-stats/includes/widgets/global-card.php on line 3
    • > PHP Notice
      Undefined variable: bgcolor in wp-content/plugins/corona-covid-19-stats/includes/widgets/global-wide.php on line 3

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 90% 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: coronavirus, covid-19, stats, virus, covid...

corona-covid-19-stats/corona-covid-stats.php 77% from 13 tests

This is the main PHP file of "Coronavirus (COVID-19) Live Stats & Updates - Beautiful Graphics, Charts, Wordlwide / Country Stats (USA, Spain, China, Pakistan ...)" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("corona-covid-19-stats.php" instead of "corona-covid-stats.php")
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected1,632 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS4177677
JavaScript145744669
PHP107471235
Markdown126051

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods466.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin