83% coronavirus-info

Code Review | Coronavirus Info

WordPress plugin Coronavirus Info scored83%from 54 tests.

About plugin

  • Plugin page: coronavirus-info
  • Plugin version: 1.0....
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.5
  • WordPress version: 6.3.1
  • First release: Apr 21, 2020
  • Latest release: Nov 8, 2020
  • Number of updates: 16
  • Update frequency: every 12.6 days
  • Top authors: softwareelites (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /1,319 total downloads

Benchmarks

Plugin footprint 83% from 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.00MB] [CPU: ▼5.02ms] Passed 4 tests

A check of server-side resources used by Coronavirus Info
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.94 ▲0.75
Dashboard /wp-admin3.31 ▼0.0343.05 ▼14.64
Posts /wp-admin/edit.php3.36 ▲0.0148.25 ▲1.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.65 ▼6.31
Media Library /wp-admin/upload.php3.23 ▲0.0136.64 ▲0.14

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Coronavirus Info
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.28 ▼1.105.06 ▲3.0040.07 ▼2.89
Dashboard /wp-admin2,206 ▲185.81 ▼0.0895.38 ▼17.0439.73 ▼5.55
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0039.71 ▲0.7936.25 ▼0.72
Add New Post /wp-admin/post-new.php1,533 ▼023.28 ▼0.01645.82 ▼43.2262.20 ▲1.15
Media Library /wp-admin/upload.php1,388 ▲64.15 ▼0.0299.53 ▲0.9543.48 ▼1.03

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/coronavirus-info/us-coronavirus-info.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Requires php: Version format is invalid
  • Tags: There are too many tags (18 tag instead of maximum 10)
You can take inspiration from this readme.txt

coronavirus-info/us-coronavirus-info.php 77% from 13 tests

The principal PHP file in "Coronavirus Info" v. 1.0.... is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("coronavirus-info.php" instead of "us-coronavirus-info.php")
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "1.0....")
  • Description: Please keep the plugin description shorter than 140 characters (currently 188 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected40 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP130740

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin