79% web-vitals-tracking

Code Review | Web Vitals Tracking

WordPress plugin Web Vitals Tracking scored 79% from 54 tests.

About plugin

  • Plugin page: web-vitals-tracking
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.4.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Jun 24, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: eatzeni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 628 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Web Vitals Tracking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.83 ▲4.20
Dashboard /wp-admin3.32 ▲0.0245.72 ▼4.62
Posts /wp-admin/edit.php3.37 ▲0.0145.48 ▲0.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.75 ▼3.60
Media Library /wp-admin/upload.php3.24 ▲0.0134.16 ▲1.56

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

Browser metrics Passed 4 tests

A check of browser resources used by Web Vitals Tracking
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.59 ▼0.673.16 ▲1.3344.37 ▲2.85
Dashboard /wp-admin2,225 ▲374.85 ▼1.0598.73 ▼14.7339.37 ▼10.88
Posts /wp-admin/edit.php2,108 ▲162.04 ▲0.0135.70 ▼2.3231.97 ▼2.69
Add New Post /wp-admin/post-new.php1,541 ▼518.49 ▲0.28608.03 ▼26.4945.11 ▼16.52
Media Library /wp-admin/upload.php1,404 ▲164.23 ▲0.0393.41 ▼9.0040.83 ▼4.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wpwebvitalstrack
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 86% 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: core web vitals, site health, web vitals analytics, web vitals tracking, web vitals...

web-vitals-tracking/webvitalstracking.php 69% from 13 tests

This is the main PHP file of "Web Vitals Tracking" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 230 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("web-vitals-tracking.php" instead of "webvitalstracking.php")

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
Success! There were no dangerous files found in this plugin1,281 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP131952291,064
CSS140143
JavaScript351174

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.80
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods38.11%
▷ Public methods2875.68%
▷ Protected methods00.00%
▷ Private methods924.32%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
There were not PNG files found in your plugin