84% covid-19-live-updates

Code Review | Covid 19 Live Updates Widgets

WordPress plugin Covid 19 Live Updates Widgets scored84%from 54 tests.

About plugin

  • Plugin page: covid-19-live-upd...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3
  • WordPress version: 6.3.1
  • First release: Mar 31, 2020
  • Latest release: Apr 9, 2020
  • Number of updates: 15
  • Update frequency: every 0.6 days
  • Top authors: berezitski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /920 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.73ms] Passed 4 tests

This is a short check of server-side resources used by Covid 19 Live Updates Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.20 ▼4.17
Dashboard /wp-admin3.31 ▲0.0143.87 ▼6.49
Posts /wp-admin/edit.php3.36 ▲0.0148.51 ▼1.74
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.54 ▼2.51
Media Library /wp-admin/upload.php3.24 ▲0.0134.16 ▲1.44

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_distorsecounter_widget
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Covid 19 Live Updates Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.26 ▼1.304.52 ▲2.6641.43 ▼1.20
Dashboard /wp-admin2,206 ▲154.85 ▼0.05109.89 ▲6.6138.83 ▼2.59
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0839.04 ▼2.8335.93 ▲0.95
Add New Post /wp-admin/post-new.php1,514 ▼517.68 ▼5.57596.48 ▼82.8851.42 ▼13.17
Media Library /wp-admin/upload.php1,388 ▲34.25 ▲0.0594.32 ▼4.4839.21 ▼5.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_distorsecounter_widget
    • db_upgraded

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/covid-19-live-updates/includes/scripts.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/covid-19-live-updates/includes/distorse-counter.php:5

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: You can take inspiration from this readme.txt

covid-19-live-updates/distorse-covid19-live.php 92% from 13 tests

The principal PHP file in "Covid 19 Live Updates Widgets" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("covid-19-live-updates.php" instead of "distorse-covid19-live.php")

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
There were no executable files found in this plugin111 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3194683
CSS14028

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected