77% corona-meter-india

Code Review | Corona Meter India

WordPress plugin Corona Meter India scored77%from 54 tests.

About plugin

  • Plugin page: corona-meter-india
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 19, 2020
  • Latest release: Aug 19, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: rashmibright (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /631 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.50ms] Passed 4 tests

This is a short check of server-side resources used by Corona Meter India
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.22 ▼7.26
Dashboard /wp-admin3.41 ▲0.1148.40 ▼6.86
Posts /wp-admin/edit.php3.53 ▲0.1752.49 ▲2.76
Add New Post /wp-admin/post-new.php5.99 ▲0.1184.62 ▼7.68
Media Library /wp-admin/upload.php3.34 ▲0.1134.88 ▼4.19

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_corona_meter_india_helpline
widget_recent-comments
widget_corona_meter_india_country
theysaidso_admin_options
widget_theysaidso_widget
widget_corona_meter_india_state
widget_recent-posts

Browser metrics Passed 4 tests

Corona Meter India: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.19 ▼1.161.66 ▼0.2742.82 ▼0.37
Dashboard /wp-admin2,209 ▲185.91 ▲1.04100.37 ▼3.8540.90 ▼0.63
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0237.00 ▲2.4535.61 ▼0.61
Add New Post /wp-admin/post-new.php1,519 ▼2323.09 ▲4.80660.32 ▲30.8061.01 ▲11.51
Media Library /wp-admin/upload.php1,382 ▼64.19 ▲0.0197.44 ▼6.4141.31 ▼0.71

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 9 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_corona_meter_india_helpline
    • can_compress_scripts
    • widget_corona_meter_india_state
    • widget_recent-comments
    • widget_corona_meter_india_country
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/corona-meter-india/corona-meter-india.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/corona-meter-india/includes/class-cmiwidget-helpline.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/corona-meter-india/includes/class-cmiwidget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/corona-meter-india/includes/class-cmiwidget-state.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: Please describe screenshot #4 in corona-meter-india/assets to your readme.txt
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

corona-meter-india/corona-meter-india.php 92% from 13 tests

The entry point to "Corona Meter India" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 866 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin786 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP613260451
PO File2120120288
CSS110047

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity7.25
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/indianflag.png4.16KB4.33KB0.00%