83% msit-corona-virus-live-update-widgets

Code Review | MSIT Corona Virus Live Update Widgets

WordPress plugin MSIT Corona Virus Live Update Widgets scored83%from 54 tests.

About plugin

  • Plugin page: msit-corona-virus...
  • Plugin version: 3.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Apr 21, 2020
  • Latest release: Apr 23, 2020
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: mysoftit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by MSIT Corona Virus Live Update Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.80 ▼5.57
Dashboard /wp-admin3.32 ▲0.0146.98 ▼3.50
Posts /wp-admin/edit.php3.37 ▲0.0144.44 ▼0.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.68 ▼17.07
Media Library /wp-admin/upload.php3.24 ▲0.0132.81 ▲2.16

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_msit_coronavirus_live_update_widgets
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by MSIT Corona Virus Live Update Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.18 ▼1.171.81 ▼0.0444.07 ▼0.14
Dashboard /wp-admin2,209 ▲185.79 ▲0.9293.85 ▼11.9336.82 ▼6.66
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0234.86 ▲0.1732.57 ▼2.42
Add New Post /wp-admin/post-new.php1,533 ▲1923.41 ▲5.88662.35 ▲8.0355.28 ▼6.54
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0496.13 ▲0.1242.28 ▲0.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_msit_coronavirus_live_update_widgets
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/msit-corona-virus-live-update-widgets/views/msit_corona_virus_update.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/msit-corona-virus-live-update-widgets/views/msit_corona_virus_update.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/msit-corona-virus-live-update-widgets/views/msit_corona_virus_update.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/msit-corona-virus-live-update-widgets/views/msit_corona_virus_admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: covit19 wordpress widget, covid 19 news, coronavirus update, corona countdown, coronavirus wordpress widget...

msit-corona-virus-live-update-widgets/msit-coronavirus-live-update-widgets.php 69% from 13 tests

The entry point to "MSIT Corona Virus Live Update Widgets" version 3.1.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("msit-corona-virus-live-update-widgets.php" instead of "msit-coronavirus-live-update-widgets.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 401 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin640 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP51560513
CSS125127

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.81
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) images/virus-logo.png25.28KB0.00KB▼ 100.00%