84% corona-virus-covid19-banner

Code Review | South African COVID19 Banner

WordPress plugin South African COVID19 Banner scored84%from 54 tests.

About plugin

  • Plugin page: corona-virus-covi...
  • Plugin version: 0.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Apr 3, 2020
  • Latest release: Jun 15, 2020
  • Number of updates: 16
  • Update frequency: every 4.6 days
  • Top authors: bridgementdevops (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,858 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
Install script ran successfully

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

Analyzing server-side resources used by South African COVID19 Banner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.16 ▲4.07
Dashboard /wp-admin3.31 ▲0.0146.78 ▼6.73
Posts /wp-admin/edit.php3.37 ▲0.0146.44 ▼6.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.55 ▼14.41
Media Library /wp-admin/upload.php3.24 ▲0.0139.20 ▲2.77

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for South African COVID19 Banner
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,061 ▲30013.44 ▼0.8312.36 ▲10.5979.81 ▲26.40
Dashboard /wp-admin2,211 ▲375.67 ▲0.1491.18 ▼1.6541.38 ▲0.42
Posts /wp-admin/edit.php2,113 ▲132.02 ▲0.0139.45 ▼1.7736.80 ▲0.29
Add New Post /wp-admin/post-new.php1,539 ▲1322.98 ▼0.29679.89 ▼7.9759.15 ▲6.07
Media Library /wp-admin/upload.php1,416 ▲164.20 ▼0.06110.24 ▲0.1148.52 ▲2.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/corona-virus-covid19-banner/corona-virus-covid19-banner.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

corona-virus-covid19-banner/corona-virus-covid19-banner.php Passed 13 tests

The main file in "South African COVID19 Banner" v. 0.4.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
37 characters long description:
Display South African COVID-19 banner

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin802 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16741571
CSS1150141
JavaScript15090

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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 Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/coat.png21.79KB7.40KB▼ 66.06%