77% yatko-coronavirus

Code Review | Coronavirus Update

WordPress plugin Coronavirus Update scored77%from 54 tests.

About plugin

  • Plugin page: yatko-coronavirus
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 1, 2020
  • Latest release: Apr 2, 2020
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: Yatko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,696 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▲112.54ms] Passed 4 tests

An overview of server-side resources used by Coronavirus Update
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.06196.60 ▲158.29
Dashboard /wp-admin3.40 ▲0.10297.74 ▲256.80
Posts /wp-admin/edit.php3.45 ▲0.10165.14 ▲125.93
Add New Post /wp-admin/post-new.php5.92 ▲0.04241.95 ▲140.67
Media Library /wp-admin/upload.php3.26 ▲0.0461.60 ▲25.25

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_coronafeed
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Coronavirus Update
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4413.24 ▼1.141.78 ▼0.1338.13 ▼6.59
Dashboard /wp-admin2,206 ▲184.83 ▼1.06106.39 ▼9.9240.41 ▼4.65
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0439.54 ▲4.1734.24 ▲3.81
Add New Post /wp-admin/post-new.php1,513 ▼1521.47 ▼1.74672.54 ▲34.8366.26 ▲13.45
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.1394.93 ▼5.2542.30 ▼1.33

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/yatko-coronavirus/views/feed.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/yatko-coronavirus/class.widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/yatko-coronavirus/quarantine.php:16
    • > PHP Notice
      Undefined variable: feed in wp-content/plugins/yatko-coronavirus/views/feed.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/yatko-coronavirus/views/feed.php on line 16
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/yatko-coronavirus/views/feed.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/yatko-coronavirus/views/feed-admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is missing
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Coronavirus WordPress Plugin), #2 (Coronavirus WordPress Plugin - Widget), #3 (Coronavirus WordPress Plugin - Countries)
You can take inspiration from this readme.txt

yatko-coronavirus/quarantine.php 77% from 13 tests

The main PHP script in "Coronavirus Update" version 1.1.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 372 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yatko-coronavirus.php" instead of "quarantine.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
Success! There were no dangerous files found in this plugin381 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP64628231
CSS1131785
SVG10036
JavaScript15029

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.50
▷ Minimum class complexity6.00
▷ Maximum class complexity13.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods330.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin