88% zone-pandemic-covid-19

Code Review | Zone Pandemic Covid19

WordPress plugin Zone Pandemic Covid19 scored 88% from 54 tests.

About plugin

  • Plugin page: zone-pandemic-cov...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 5.8.1
  • First release: Aug 1, 2020
  • Latest release: May 7, 2021
  • Number of updates: 16
  • Update frequency: every 17.6 days
  • Top authors: zekinah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 393 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼143.58ms] Passed 4 tests

An overview of server-side resources used by Zone Pandemic Covid19
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.2441.27 ▲13.73
Dashboard /wp-admin3.24 ▲0.1956.56 ▲2.02
Posts /wp-admin/edit.php3.29 ▲0.1852.39 ▲2.75
Add New Post /wp-admin/post-new.php5.54 ▲0.11101.16 ▼575.92
Media Library /wp-admin/upload.php3.12 ▲0.1237.37 ▼3.18

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 59 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Zone Pandemic Covid19
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,934 ▲33820.87 ▲5.5376.57 ▲64.9789.55 ▲34.55
Dashboard /wp-admin3,238 ▲3076.72 ▲0.56186.05 ▲4.81190.08 ▲60.23
Posts /wp-admin/edit.php2,782 ▲433.26 ▲0.5599.07 ▲19.7395.23 ▲0.06
Add New Post /wp-admin/post-new.php3,575 ▲1,96014.92 ▼6.56522.04 ▲194.37120.89 ▲15.58
Media Library /wp-admin/upload.php1,865 ▲585.50 ▲0.50169.59 ▼12.91125.98 ▼5.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-global.php
    • > /wp-content/plugins/zone-pandemic-covid-19/admin/view/tab-home.php
    • > /wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-country.php
    • > /wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-continent.php
    • > /wp-content/plugins/zone-pandemic-covid-19/admin/view/widget-pandemic-covid19-global.php
    • > /wp-content/plugins/zone-pandemic-covid-19/admin/view/tab-help.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-country.php on line 16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/zone-pandemic-covid-19/admin/view/pandemic-covid19-admin-display.php:18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-continent.php on line 16
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-continent.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-global.php on line 16
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-global.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-table.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-map.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-graph.php:19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/zone-pandemic-covid-19/public/view/zone-pandemic-covid19-country.php on line 16

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Requires php: Version format is invalid
You can look at the official readme.txt

zone-pandemic-covid-19/pandemic-covid19.php 85% from 13 tests

The main PHP script in "Zone Pandemic Covid19" version 1.0.9 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("zone-pandemic-covid-19.php" instead of "pandemic-covid19.php")

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 plugin18,886 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
CSS81968210,243
JavaScript122,0137,1026,279
PHP282879592,345
JSON10019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.87
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods103
▷ Static methods21.94%
▷ Public methods7875.73%
▷ Protected methods1817.48%
▷ Private methods76.80%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin