84% corona

Code Review | Corona

WordPress plugin Corona scored84%from 54 tests.

About plugin

  • Plugin page: corona
  • Plugin version: 3.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7
  • WordPress version: 6.3.1
  • First release: Mar 31, 2020
  • Latest release: May 18, 2021
  • Number of updates: 10
  • Update frequency: every 41.3 days
  • Top authors: largbasket (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /4,819 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲2,565.17ms] 75% from 4 tests

This is a short check of server-side resources used by Corona
Please have a look at the following items
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 2,565.17ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.042,591.83 ▲2,545.15
Dashboard /wp-admin3.33 ▲0.032,608.86 ▲2,551.53
Posts /wp-admin/edit.php3.44 ▲0.092,652.99 ▲2,601.01
Add New Post /wp-admin/post-new.php5.93 ▲0.042,664.75 ▲2,562.97
Media Library /wp-admin/upload.php3.25 ▲0.022,682.98 ▲2,649.21

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
corona_countries
corona_all
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
corona_last_updated
corona_history
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Corona
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.18 ▼1.061.74 ▼0.2936.82 ▼13.90
Dashboard /wp-admin2,232 ▲265.88 ▲1.02104.75 ▼14.9346.77 ▲2.31
Posts /wp-admin/edit.php2,117 ▲172.03 ▼0.0042.15 ▲3.4742.60 ▲3.19
Add New Post /wp-admin/post-new.php1,553 ▲2721.13 ▼2.35662.86 ▲36.2967.83 ▲14.35
Media Library /wp-admin/upload.php1,417 ▲174.21 ▲0.02100.91 ▼10.9244.08 ▼5.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 10 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • corona_last_updated
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • corona_countries
    • db_upgraded
    • corona_all
    • corona_history

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/corona/templates/corona.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/corona/templates/corona-chart.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/corona/templates/corona-line.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/corona/templates/corona-table.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/corona/templates/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/corona/templates/corona-map.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/corona/templates/corona-table-bing.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/corona/templates/corona-list.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: corona map, coronavirus, corona live update, ncov, virus...

corona/corona.php 92% from 13 tests

This is the main PHP file of "Corona" version 3.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "4.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,042 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP987261,126
CSS112313738
JavaScript22814178

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.26MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/bg.png261.00KB129.90KB▼ 50.23%
assets/images/world.png2.80KB1.36KB▼ 51.24%