84% covid-19-bangladesh-live

Code Review | Corona Bangladesh Live

WordPress plugin Corona Bangladesh Live scored84%from 54 tests.

About plugin

  • Plugin page: covid-19-banglade...
  • Plugin version: 2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2020
  • Latest release: Feb 19, 2021
  • Number of updates: 28
  • Update frequency: every 10.8 days
  • Top authors: amdad121 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /7,838 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.09MB] [CPU: ▼8.39ms] Passed 4 tests

Analyzing server-side resources used by Corona Bangladesh Live
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1036.12 ▼4.15
Dashboard /wp-admin3.40 ▲0.0543.98 ▼10.84
Posts /wp-admin/edit.php3.51 ▲0.1542.16 ▼2.10
Add New Post /wp-admin/post-new.php5.98 ▲0.0980.26 ▼16.46
Media Library /wp-admin/upload.php3.32 ▲0.0933.57 ▲0.15

Server storage [IO: ▲0.43MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 9 new options
New WordPress options
widget_corona_world
can_compress_scripts
widget_recent-posts
db_upgraded
widget_corona_districts
widget_corona_bd
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Corona Bangladesh Live
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.35 ▼0.061.56 ▼0.2939.03 ▼2.22
Dashboard /wp-admin2,198 ▲245.62 ▲0.0883.85 ▼3.0538.70 ▼3.20
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0433.45 ▼2.5333.85 ▼6.57
Add New Post /wp-admin/post-new.php1,526 ▼322.99 ▼0.33644.23 ▼20.5651.79 ▼2.83
Media Library /wp-admin/upload.php1,400 ▲64.17 ▼0.0495.40 ▼4.1342.19 ▼0.28

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/covid-19-bangladesh-live/widget_1.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/covid-19-bangladesh-live/widget_3.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/covid-19-bangladesh-live/shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/covid-19-bangladesh-live/covid-19-bd-live.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/covid-19-bangladesh-live/widget_2.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: covid-19, corona bangladesh live, corona bangladesh, corona, covid-19 bd

covid-19-bangladesh-live/covid-19-bd-live.php 92% from 13 tests

The primary PHP file in "Corona Bangladesh Live" version 2.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("covid-19-bangladesh-live.php" instead of "covid-19-bd-live.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin938 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP63531512
Sass330403
JavaScript20019
CSS4004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity3.33
▷ Minimum class complexity3.00
▷ Maximum class complexity4.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) public/img/virus-logo.png25.28KB0.00KB▼ 100.00%