79% ce-corona

Code Review | COVID19 - Coronavirus Outbreak Data

WordPress plugin COVID19 - Coronavirus Outbreak Data scored79%from 54 tests.

About plugin

  • Plugin page: ce-corona
  • Plugin version: 0.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Apr 1, 2020
  • Latest release: Aug 13, 2023
  • Number of updates: 41
  • Update frequency: every 30.0 days
  • Top authors: priyomukul (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

700+ active /22,216 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.52MB] [CPU: ▼1.16ms] Passed 4 tests

Analyzing server-side resources used by COVID19 - Coronavirus Outbreak Data
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5441.30 ▼1.37
Dashboard /wp-admin3.82 ▲0.5250.19 ▼1.33
Posts /wp-admin/edit.php3.93 ▲0.5852.68 ▲4.44
Add New Post /wp-admin/post-new.php6.40 ▲0.52100.99 ▼3.47
Media Library /wp-admin/upload.php3.74 ▲0.5138.83 ▲1.53

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_corona_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for COVID19 - Coronavirus Outbreak Data
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲2014.25 ▼0.101.88 ▼0.0738.27 ▼4.84
Dashboard /wp-admin2,212 ▲355.66 ▲0.0883.04 ▼12.3471.62 ▲30.50
Posts /wp-admin/edit.php2,123 ▲261.98 ▲0.0040.09 ▲3.3934.89 ▼0.29
Add New Post /wp-admin/post-new.php1,553 ▲2718.15 ▼5.17654.67 ▼28.90165.07 ▲108.56
Media Library /wp-admin/upload.php1,411 ▲144.19 ▼0.01104.74 ▲1.8276.00 ▲32.35

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_corona_widget
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% 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 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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ce-corona/classes/admin/views/settings.php
    • > /wp-content/plugins/ce-corona/ce-corona.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ce-corona/classes/admin/widget.php:6
    • > PHP Warning
      Use of undefined constant CE_CORONA_ASSETS - assumed 'CE_CORONA_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/ce-corona/classes/admin/views/settings.php on line 57

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: covid19, coronavirus, corona

ce-corona/ce-corona.php Passed 13 tests

The principal PHP file in "COVID19 - Coronavirus Outbreak Data" v. 0.7.0 is loaded by WordPress automatically on each request
72 characters long description:
Realtime covid19 outbreak data checker and Awareness Plugin coronavirus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected6,537 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP162474753,794
CSS8186121,196
PO File1397451809
JavaScript721707693
SVG10045

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.62
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods85
▷ Static methods3440.00%
▷ Public methods7183.53%
▷ Protected methods78.24%
▷ Private methods78.24%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/admin/elementor-elements.png2.99KB3.37KB0.00%
assets/images/logo.png3.46KB3.85KB0.00%