77% coronavirus-data-widgets

Code Review | Coronavirus (COVID-19) Outbreak Data Widgets

WordPress plugin Coronavirus (COVID-19) Outbreak Data Widgets scored77%from 54 tests.

About plugin

  • Plugin page: coronavirus-data-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Apr 18, 2020
  • Latest release: Aug 17, 2020
  • Number of updates: 11
  • Update frequency: every 11.0 days
  • Top authors: khushwantsidhu (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

500+ active /11,264 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
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼8.61ms] Passed 4 tests

Analyzing server-side resources used by Coronavirus (COVID-19) Outbreak Data Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.18 ▼1.09
Dashboard /wp-admin3.51 ▲0.1746.71 ▼15.95
Posts /wp-admin/edit.php3.62 ▲0.2746.82 ▼4.28
Add New Post /wp-admin/post-new.php6.11 ▲0.2382.60 ▼13.13
Media Library /wp-admin/upload.php3.43 ▲0.2136.32 ▲0.80
All Ticker Shortcodes /wp-admin/edit.php?post_type=cvct4.30203.63
Add New /wp-admin/post-new.php?post_type=cvct4.63214.00

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 119 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
CVDW_activation_time
CVDW-type
theysaidso_admin_options
CVDW-alreadyRated
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Coronavirus (COVID-19) Outbreak Data Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲20014.04 ▼0.335.37 ▲3.1942.20 ▼8.00
Dashboard /wp-admin2,240 ▲554.86 ▼1.0298.23 ▼2.0340.45 ▲1.51
Posts /wp-admin/edit.php2,123 ▲342.04 ▲0.0835.77 ▼2.2332.47 ▼1.61
Add New Post /wp-admin/post-new.php1,541 ▲823.28 ▲0.09669.17 ▼16.5258.31 ▲5.51
Media Library /wp-admin/upload.php1,422 ▲374.21 ▼0.0099.89 ▼6.4740.74 ▼6.31
All Ticker Shortcodes /wp-admin/edit.php?post_type=cvct1,1172.0233.6428.60
Add New /wp-admin/post-new.php?post_type=cvct2,3303.5792.7977.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • CVDW-type
    • can_compress_scripts
    • CVDW-alreadyRated
    • widget_theysaidso_widget
    • CVDW_activation_time
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following
  • 40× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/CMB2_Field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/coronavirus-data-widgets/admin/cmb2/includes/types/CMB2_Type_Text_Time.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=cvct
    • > Network (severe)
    https://res.cloudinary.com/cooltimeline/image/upload/v1504097450/stars5_gtc1rg.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: coronavirus data, covid19, covid19 widgets, corona virus, coronavirus...

coronavirus-data-widgets/coronavirus-data-widgets.php 69% from 13 tests

The principal PHP file in "Coronavirus (COVID-19) Outbreak Data Widgets" v. 1.1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 183 characters long)
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages*/")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages*/")

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
Success! There were no dangerous files found in this plugin16,122 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code
PHP612,1765,7687,753
CSS191,3651,1686,247
JavaScript175046232,122

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity18.82
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes72
▷ Abstract classes811.11%
▷ Concrete classes6488.89%
▷ Final classes11.56%
Methods558
▷ Static methods8214.70%
▷ Public methods46583.33%
▷ Protected methods8915.95%
▷ Private methods40.72%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants847.06%
▷ Class constants952.94%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
admin/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
admin/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
admin/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
admin/cmb2/images/ico-delete.png0.70KB0.72KB0.00%