68% covid-19-float-button

Code Review | COVID-19 Float Button

WordPress plugin COVID-19 Float Button scored68%from 54 tests.

About plugin

  • Plugin page: covid-19-float-bu...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.9
  • WordPress version: 6.3.1
  • First release: Apr 15, 2020
  • Latest release: Jan 29, 2022
  • Number of updates: 21
  • Update frequency: every 31.1 days
  • Top authors: barthusz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,206 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼55.84ms] Passed 4 tests

A check of server-side resources used by COVID-19 Float Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.43 ▼34.10
Dashboard /wp-admin2.09 ▼1.266.49 ▼50.83
Posts /wp-admin/edit.php2.09 ▼1.277.91 ▼41.16
Add New Post /wp-admin/post-new.php2.09 ▼3.806.66 ▼97.27
Media Library /wp-admin/upload.php2.09 ▼1.145.71 ▼27.91
Covid Float Button /wp-admin/options-general.php?page=cfb-options2.097.78

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

COVID-19 Float Button: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6414.74 ▲0.441.97 ▲0.2245.84 ▲5.72
Dashboard /wp-admin2,212 ▲244.84 ▼0.06112.38 ▲1.2542.36 ▼1.50
Posts /wp-admin/edit.php2,095 ▲32.01 ▲0.0334.71 ▼6.8934.39 ▲0.34
Add New Post /wp-admin/post-new.php1,519 ▼1717.94 ▼5.36667.48 ▼4.2850.30 ▼7.22
Media Library /wp-admin/upload.php1,394 ▲34.16 ▼0.0792.31 ▼8.2541.73 ▼2.74
Covid Float Button /wp-admin/options-general.php?page=cfb-options1,0202.0523.1639.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_style_is was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fontawesome handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=cfb-options
    • > User notice in wp-includes/functions.php+5905
    Function wp_style_is was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fontawesome handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/covid-19-float-button/includes/covid-float-button-admin.php:107

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: floating button, coronavirus, covid-19, link, information...

covid-19-float-button/covid-float-button.php 92% from 13 tests

Analyzing the main PHP file in "COVID-19 Float Button" version 1.1
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-float-button.php" instead of "covid-float-button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected12,581 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,299
CSS21,48063,099
PHP21820183

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin