84% covid-19-stats-shortcode

Code Review | COVID-19 Stats Shortcode

WordPress plugin COVID-19 Stats Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: covid-19-stats-sh...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3
  • WordPress version: 6.3.1
  • First release: Mar 24, 2020
  • Latest release: Apr 17, 2020
  • Number of updates: 7
  • Update frequency: every 3.4 days
  • Top authors: jagdish1o1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,634 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.69ms] Passed 4 tests

This is a short check of server-side resources used by COVID-19 Stats Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.59 ▲0.88
Dashboard /wp-admin3.31 ▲0.0043.62 ▼6.13
Posts /wp-admin/edit.php3.36 ▲0.0041.97 ▼4.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.96 ▼17.31
Media Library /wp-admin/upload.php3.23 ▲0.0037.34 ▲3.93

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

COVID-19 Stats Shortcode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.451.61 ▼0.0737.49 ▼9.20
Dashboard /wp-admin2,195 ▲215.53 ▼0.0884.85 ▼0.1539.55 ▼2.56
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0434.66 ▼6.2136.27 ▼1.33
Add New Post /wp-admin/post-new.php1,526 ▼323.04 ▼0.48677.68 ▲65.3164.46 ▲7.93
Media Library /wp-admin/upload.php1,403 ▲64.18 ▼0.04110.73 ▲10.8045.55 ▲1.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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
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 items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/covid-19-stats-shortcode/covid-19-stats-shortcode.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: coronavirus, covid-19

covid-19-stats-shortcode/covid-19-stats-shortcode.php Passed 13 tests

Analyzing the main PHP file in "COVID-19 Stats Shortcode" version 1.2
64 characters long description:
Display Coronavirus Stats through shortcode on Any Page or Post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,406 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS228101,248
PHP24914158

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin