84% web-vitals-block

Code Review | Web Vitals Block

WordPress plugin Web Vitals Block scored84%from 54 tests.

About plugin

  • Plugin page: web-vitals-block
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.5
  • WordPress version: 6.3.1
  • First release: Aug 26, 2020
  • Latest release: Sep 7, 2020
  • Number of updates: 7
  • Update frequency: every 1.9 days
  • Top authors: adamsilverstein (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,197 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Web Vitals Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.95 ▼2.82
Dashboard /wp-admin3.32 ▲0.0151.17 ▼0.45
Posts /wp-admin/edit.php3.37 ▲0.0149.31 ▼7.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.47 ▼2.69
Media Library /wp-admin/upload.php3.24 ▲0.0134.14 ▼0.92

Server storage [IO: ▲0.63MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/web-vitals-block/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Web Vitals Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4313.20 ▼1.215.48 ▲3.3343.50 ▼9.36
Dashboard /wp-admin2,225 ▲195.80 ▲0.9195.73 ▼20.3635.86 ▼8.16
Posts /wp-admin/edit.php2,107 ▲42.02 ▼0.0035.91 ▼3.6435.44 ▲3.24
Add New Post /wp-admin/post-new.php6,370 ▲4,82127.59 ▲4.49936.11 ▲231.8740.11 ▼21.45
Media Library /wp-admin/upload.php1,407 ▲74.23 ▼0.0299.72 ▼7.1843.43 ▼0.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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/web-vitals-block/web-vitals-block.php:62

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: block, web vitals, core web vitals

web-vitals-block/web-vitals-block.php Passed 13 tests

The main PHP file in "Web Vitals Block" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
19 characters long description:
A Web Vitals block.

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
No dangerous file extensions were detected17,534 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JSON30017,291
JavaScript92188178
PHP261740
Sass23023
CSS2202

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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%
Functions1
▷ Named functions1100.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 are no PNG files in this plugin