84% corona-results-bangladesh

Code Review | Corona Results Bangladesh

WordPress plugin Corona Results Bangladesh scored84%from 54 tests.

About plugin

  • Plugin page: corona-results-ba...
  • Plugin version: 3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: Mar 24, 2020
  • Latest release: Apr 27, 2020
  • Number of updates: 41
  • Update frequency: every 0.8 days
  • Top authors: rashedulhaquerumi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /7,162 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.73ms] Passed 4 tests

A check of server-side resources used by Corona Results Bangladesh
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.29 ▼2.20
Dashboard /wp-admin3.38 ▲0.0749.48 ▼4.76
Posts /wp-admin/edit.php3.49 ▲0.1352.66 ▲2.99
Add New Post /wp-admin/post-new.php5.96 ▲0.0793.74 ▼7.58
Media Library /wp-admin/upload.php3.30 ▲0.0737.90 ▼4.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
widget_corona_bd_widget_world
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_corona_bd_widget

Browser metrics Passed 4 tests

Corona Results Bangladesh: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.70 ▲0.352.15 ▲0.4138.54 ▼8.63
Dashboard /wp-admin2,192 ▲125.62 ▼0.0591.98 ▼0.5140.36 ▲2.06
Posts /wp-admin/edit.php2,103 ▲62.03 ▼0.0740.56 ▲2.4435.71 ▼3.39
Add New Post /wp-admin/post-new.php1,526 ▼023.61 ▲0.06663.44 ▼52.1654.86 ▲1.57
Media Library /wp-admin/upload.php1,400 ▲34.24 ▼0.0095.78 ▼22.3043.74 ▼5.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_corona_bd_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_corona_bd_widget_world

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 | 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/corona-results-bangladesh/corona_bd.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: corona countdown, count, corona count bad, widget, corona

corona-results-bangladesh/corona_bd.php 85% from 13 tests

The principal PHP file in "Corona Results Bangladesh" v. 3.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("corona-results-bangladesh.php" instead of "corona_bd.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 334 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 plugin594 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16951331
CSS1368263

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity8.00
▷ Minimum class complexity4.00
▷ Maximum class complexity12.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin