84% visual-regression-tests

Code Review | VRTs - Visual Regression Tests

WordPress plugin VRTs - Visual Regression Tests scored84%from 54 tests.

About plugin

  • Plugin page: visual-regression...
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 28, 2022
  • Latest release: Nov 24, 2023
  • Number of updates: 29
  • Update frequency: every 12.6 days
  • Top authors: bleechberlin (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /3,019 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.74MB] [CPU: ▲6.37ms] Passed 4 tests

This is a short check of server-side resources used by VRTs - Visual Regression Tests
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.6941.55 ▲7.19
Dashboard /wp-admin4.04 ▲0.7351.94 ▲3.98
Posts /wp-admin/edit.php4.16 ▲0.8057.53 ▲8.08
Add New Post /wp-admin/post-new.php6.73 ▲0.83105.25 ▲16.63
Media Library /wp-admin/upload.php3.97 ▲0.7342.72 ▲6.23
Tests /wp-admin/admin.php?page=vrts4.1146.77
Alerts /wp-admin/admin.php?page=vrts-alerts4.0641.56
Settings /wp-admin/admin.php?page=vrts-settings3.9537.97
Upgrade /wp-admin/admin.php?page=vrts-upgrade3.9536.73

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 103 new files
Database: 2 new tables, 17 new options
New tables
wp_vrts_alerts
wp_vrts_tests
New WordPress options
vrts_project_id
vrts_alerts_db_version
vrts_tier_id
widget_recent-comments
vrts_project_token
widget_theysaidso_widget
vrts_homepage_added
vrts_has_subscription
vrts_total_tests
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by VRTs - Visual Regression Tests
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14014.35 ▼0.051.65 ▲0.0937.33 ▼0.53
Dashboard /wp-admin2,288 ▲1075.74 ▲0.0593.48 ▼18.2237.32 ▼5.19
Posts /wp-admin/edit.php2,214 ▲1142.20 ▲0.1940.81 ▲0.8836.77 ▲0.32
Add New Post /wp-admin/post-new.php1,615 ▲8924.22 ▲1.16638.51 ▼45.3045.86 ▼21.70
Media Library /wp-admin/upload.php1,493 ▲904.29 ▲0.1399.67 ▼3.2941.27 ▼0.55
Tests /wp-admin/admin.php?page=vrts1,2852.3243.1333.60
Alerts /wp-admin/admin.php?page=vrts-alerts1,1382.1529.1632.65
Settings /wp-admin/admin.php?page=vrts-settings9712.2527.3130.16
Upgrade /wp-admin/admin.php?page=vrts-upgrade2,2233.1072.0951.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
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
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 45× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/visual-regression-tests/components/metabox-classic-editor/index.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/visual-regression-tests/components/admin-notification/views/admin-notification-new-test-added.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/visual-regression-tests/components/admin-notification/index.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Vrts\\Core\\Utilities\\Async_Request' not found in wp-content/plugins/visual-regression-tests/includes/core/utilities/class-background-process.php:10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/visual-regression-tests/includes/list-tables/class-alerts-list-table.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/visual-regression-tests/components/alerts-page/views/alerts-page-view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/visual-regression-tests/components/admin-notification/views/admin-notification-get-started.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/visual-regression-tests/components/admin-notification/views/admin-notification-test-disabled.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/visual-regression-tests/components/metabox-classic-editor/metabox-notifications/metabox-notification-connection-failed.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/visual-regression-tests/components/metabox-classic-editor/metabox-notifications/metabox-notification-unlock-more-tests.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 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
5 plugin tags: tests, vrts, visual regression, visual, regression

visual-regression-tests/visual-regression-tests.php Passed 13 tests

The main PHP script in "VRTs - Visual Regression Tests" version 1.6.0 is automatically included on every request by WordPress
88 characters long description:
Test your website for unwanted visual changes. Run automatic tests and spot differences.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected6,952 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
PHP751,0912,1294,960
JavaScript141731611,291
Sass81642691
CSS2008
SVG2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.72
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces11
Interfaces0
Traits2
Classes38
▷ Abstract classes25.26%
▷ Concrete classes3694.74%
▷ Final classes00.00%
Methods315
▷ Static methods11034.92%
▷ Public methods27687.62%
▷ Protected methods226.98%
▷ Private methods175.40%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants12
▷ Global constants216.67%
▷ Class constants1083.33%
▷ Public constants10100.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