78% wp-covid-19-schema

Code Review | WP COVID-19 Schema

WordPress plugin WP COVID-19 Schema scored78%from 54 tests.

About plugin

  • Plugin page: wp-covid-19-schema
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: Apr 27, 2020
  • Number of updates: 11
  • Update frequency: every 3.1 days
  • Top authors: sweans (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /866 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.18MB] [CPU: ▼0.55ms] Passed 4 tests

Analyzing server-side resources used by WP COVID-19 Schema
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1843.94 ▼5.25
Dashboard /wp-admin3.49 ▲0.1859.77 ▲6.05
Posts /wp-admin/edit.php3.54 ▲0.1851.45 ▲0.14
Add New Post /wp-admin/post-new.php6.06 ▲0.1798.01 ▼3.16
Media Library /wp-admin/upload.php3.41 ▲0.1842.32 ▲6.87
About /wp-admin/admin.php?page=wp-covid-schema3.3840.13
Settings /wp-admin/admin.php?page=wp-covid-schema-plugin-settings3.4346.97

Server storage [IO: ▲0.25MB] [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: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP COVID-19 Schema: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲15714.15 ▼0.442.19 ▲0.1344.34 ▲0.75
Dashboard /wp-admin2,299 ▲1195.70 ▲0.0394.92 ▲6.8643.24 ▲2.24
Posts /wp-admin/edit.php2,205 ▲1022.05 ▲0.0335.35 ▼6.7133.87 ▼0.39
Add New Post /wp-admin/post-new.php1,560 ▲3223.06 ▼0.36692.80 ▲74.3352.73 ▼0.83
Media Library /wp-admin/upload.php1,504 ▲1074.27 ▲0.1197.29 ▼12.6845.93 ▲2.98
About /wp-admin/admin.php?page=wp-covid-schema1,0442.2428.6055.44
Settings /wp-admin/admin.php?page=wp-covid-schema-plugin-settings1,9432.2828.0540.59

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wp-covid-schema-plugin-settings
    • > Notice in wp-content/plugins/wp-covid-19-schema/inc/settings/settings.php+548
    Undefined variable: swwpcs_school_closure_encoding_format

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-covid-19-schema/inc/settings/settings.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: structured data, schemaorg, microdata, schema markup, schema...

wp-covid-19-schema/wp-covid19-schema.php 77% from 13 tests

The entry point to "WP COVID-19 Schema" version 1.0.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-covid-19-schema.php" instead of "wp-covid19-schema.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected2,102 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS2234191,184
PHP211332832
JavaScript152084
Markdown1002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions16
▷ Named functions16100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/settings/images/logo.png7.28KB3.54KB▼ 51.31%