73% corona-update

Code Review | Corona Update

WordPress plugin Corona Update scored73%from 54 tests.

About plugin

  • Plugin page: corona-update
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.6.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: Aug 23, 2021
  • Number of updates: 16
  • Update frequency: every 32.3 days
  • Top authors: themelooks (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /8,293 total downloads

Benchmarks

Plugin footprint 65% 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.96MB] [CPU: ▲2,869.54ms] 75% from 4 tests

Analyzing server-side resources used by Corona Update
The following require your attention
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 2,869.54ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.02 ▼0.442,870.47 ▲2,829.84
Dashboard /wp-admin3.06 ▼0.285,938.85 ▲5,872.93
Posts /wp-admin/edit.php3.06 ▼0.292,893.89 ▲2,842.84
Add New Post /wp-admin/post-new.php3.06 ▼2.832,920.52 ▲2,812.90
Media Library /wp-admin/upload.php3.06 ▼0.173,025.89 ▲2,992.59

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_corona_update_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Corona Update
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,070 ▲32415.53 ▲0.974.82 ▲3.1036.85 ▼1.80
Dashboard /wp-admin2,378 ▲1906.63 ▲1.76122.18 ▲12.7943.02 ▼1.51
Posts /wp-admin/edit.php2,287 ▲1953.61 ▲1.5948.23 ▲9.2432.36 ▼4.39
Add New Post /wp-admin/post-new.php1,700 ▲16719.97 ▼3.07573.22 ▼119.1231.07 ▼35.86
Media Library /wp-admin/upload.php1,423 ▲414.31 ▼0.0180.59 ▼25.1246.40 ▼0.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/corona-update/inc/class-get-api-data.php+26
    file_get_contents(https://corona.lmao.ninja/v2/all): failed to open stream: Redirection limit reached, aborting
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_corona_update_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/corona-update/corona-update.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/corona-update/inc/statistic-widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CoronaUpdate\\add_shortcode() in wp-content/plugins/corona-update/inc/statistic-shortcode.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CoronaUpdate\\get_option() in wp-content/plugins/corona-update/inc/awareness-popup.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #4 (/assets/screenshot-4.png)
  • Screenshots: These screenshots lack descriptions #10, #9 in corona-update/assets to your readme.txt
You can look at the official readme.txt

corona-update/corona-update.php 92% from 13 tests

The main file in "Corona Update" v. 1.6.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 233 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
No dangerous file extensions were detected1,898 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP245572911,260
CSS32610495
JavaScript2879143

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.71
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods83
▷ Static methods22.41%
▷ Public methods5060.24%
▷ Protected methods00.00%
▷ Private methods3339.76%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There were not PNG files found in your plugin