83% covid-19-live-tracking

Code Review | Covid-19 Live Tracking

WordPress plugin Covid-19 Live Tracking scored 83% from 54 tests.

About plugin

  • Plugin page: covid-19-live-tra...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 5.9.2
  • First release: Apr 15, 2020
  • Latest release: Apr 15, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: jmsthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,395 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Covid-19 Live Tracking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1274.55 ▲17.91
Dashboard /wp-admin3.44 ▲0.0435.18 ▲0.35
Posts /wp-admin/edit.php3.67 ▲0.0341.89 ▲4.74
Add New Post /wp-admin/post-new.php6.91 ▼0.06140.42 ▼1,233.40
Media Library /wp-admin/upload.php3.32 ▲0.0327.25 ▲2.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 68 new files
Database: no new tables, 2 new options
New WordPress options
widget_widget_jms_covid_19
jms_covid_params

Browser metrics Passed 4 tests

Checking browser requirements for Covid-19 Live Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,928 ▲20615.83 ▲0.1916.28 ▲10.252.24 ▼0.20
Dashboard /wp-admin2,909 ▲556.13 ▼0.11120.85 ▼20.75157.31 ▼75.58
Posts /wp-admin/edit.php2,708 ▲173.24 ▲0.0064.30 ▼2.51146.70 ▼5.53
Add New Post /wp-admin/post-new.php1,773 ▲6217.18 ▼4.22450.61 ▼36.26162.89 ▲0.99
Media Library /wp-admin/upload.php1,718 ▲265.44 ▼0.03151.84 ▼0.72197.04 ▼11.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • widget_widget_jms_covid_19
    • jms_covid_params

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/covid-19-live-tracking/admin/widgets/class-jmscovid-elementor-widget.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/covid-19-live-tracking/admin/class-jmscovid-elementor.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/covid-19-live-tracking/front/class-jmscovid-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 your attention: The official readme.txt might help

covid-19-live-tracking/jms-covid-19.php 85% from 13 tests

"Covid-19 Live Tracking" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("covid-19-live-tracking.php" instead of "jms-covid-19.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected11,426 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript262,1777,2297,818
PHP71143091,686
CSS19364571,458
Sass3151464

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity20.17
▷ Minimum class complexity2.00
▷ Maximum class complexity71.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods40
▷ Static methods717.50%
▷ Public methods3485.00%
▷ Protected methods37.50%
▷ Private methods37.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
10 PNG files occupy 0.29MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/style-4.png71.76KB24.73KB▼ 65.54%
css/DataTables-1.10.20/images/sort_both.png0.20KB0.29KB0.00%
css/DataTables-1.10.20/images/sort_asc_disabled.png0.14KB0.25KB0.00%
images/style-3.png31.11KB9.62KB▼ 69.09%
images/style-2.png59.83KB19.35KB▼ 67.66%