84% coronavirus

Code Review | Coronavirus

WordPress plugin Coronavirus scored84%from 54 tests.

About plugin

  • Plugin page: coronavirus
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 26, 2020
  • Latest release: Jan 27, 2022
  • Number of updates: 14
  • Update frequency: every 48.1 days
  • Top authors: vohotv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,401 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.06MB] [CPU: ▼2.23ms] Passed 4 tests

Analyzing server-side resources used by Coronavirus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.57 ▲2.81
Dashboard /wp-admin3.37 ▲0.0351.72 ▼16.26
Posts /wp-admin/edit.php3.49 ▲0.1356.24 ▲7.18
Add New Post /wp-admin/post-new.php5.98 ▲0.0896.84 ▲0.76
Media Library /wp-admin/upload.php3.30 ▲0.0740.70 ▲3.78

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Coronavirus: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17113.50 ▼0.857.81 ▲5.8038.72 ▼5.41
Dashboard /wp-admin2,213 ▲335.63 ▲0.0488.67 ▼9.3739.78 ▼3.66
Posts /wp-admin/edit.php2,118 ▲181.97 ▼0.0641.01 ▲5.9036.08 ▼4.07
Add New Post /wp-admin/post-new.php1,556 ▲2723.09 ▲0.02648.25 ▲5.8576.97 ▲23.27
Media Library /wp-admin/upload.php1,418 ▲214.19 ▼0.0099.90 ▼7.2144.81 ▲1.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/coronavirus/public/partials/error.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/coronavirus/admin/partials/coronavirus-settings.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/coronavirus/includes/shared-partials/coronavirus-info.php:1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === coronavirus === )
Please take inspiration from this readme.txt

coronavirus/coronavirus.php 92% from 13 tests

The main file in "Coronavirus" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin578 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14162576375
CSS25011197
JavaScript24546

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.38
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2376.67%
▷ Protected methods00.00%
▷ Private methods723.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin