72% webchangedetector

Code Review | WebChangeDetector

WordPress plugin WebChangeDetector scored72%from 54 tests.

About plugin

  • Plugin page: webchangedetector
  • Plugin version: 2.2.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.2
  • WordPress version: 6.3.1
  • First release: Aug 15, 2020
  • Latest release: Oct 7, 2022
  • Number of updates: 45
  • Update frequency: every 17.4 days
  • Top authors: Mike.Miler (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /908 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▲104.07ms] Passed 4 tests

A check of server-side resources used by WebChangeDetector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2639.78 ▲0.32
Dashboard /wp-admin3.74 ▲0.40192.89 ▲132.21
Posts /wp-admin/edit.php3.79 ▲0.43186.35 ▲141.25
Add New Post /wp-admin/post-new.php6.28 ▲0.39350.94 ▲253.67
Media Library /wp-admin/upload.php3.61 ▲0.38175.44 ▲142.48
Show Change Detection /wp-admin/admin.php?page=webchangedetector-show-detection3.62168.78
Show Screenshot /wp-admin/admin.php?page=webchangedetector-show-screenshot3.62159.87
Dashboard /wp-admin/admin.php?page=webchangedetector3.62279.59
Change Detections /wp-admin/admin.php?page=webchangedetector-change-detections3.62170.33
Upgrade Account /wp-admin/admin.php?page=3.61189.44
Update Detection /wp-admin/admin.php?page=webchangedetector-update-settings3.61170.11
Auto Detection /wp-admin/admin.php?page=webchangedetector-auto-settings3.62176.84
Settings /wp-admin/admin.php?page=webchangedetector-settings3.62158.29
Logs /wp-admin/admin.php?page=webchangedetector-logs3.62162.83

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WebChangeDetector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲22715.20 ▲0.855.44 ▲3.7742.84 ▲2.13
Dashboard /wp-admin2,274 ▲946.09 ▲0.42127.61 ▲41.8092.05 ▲49.41
Posts /wp-admin/edit.php2,178 ▲783.57 ▲1.6086.03 ▲48.2536.20 ▲2.43
Add New Post /wp-admin/post-new.php1,587 ▲6125.06 ▲1.62691.38 ▲25.6136.31 ▼18.12
Media Library /wp-admin/upload.php1,476 ▲765.20 ▲1.10143.23 ▲46.3476.47 ▲35.46
Show Change Detection /wp-admin/admin.php?page=webchangedetector-show-detection9493.6061.3025.57
Show Screenshot /wp-admin/admin.php?page=webchangedetector-show-screenshot9463.1435.6126.31
Dashboard /wp-admin/admin.php?page=webchangedetector9503.2336.3527.82
Change Detections /wp-admin/admin.php?page=webchangedetector-change-detections9503.1836.1723.24
Upgrade Account /wp-admin/admin.php?page=280.420.124.33
Update Detection /wp-admin/admin.php?page=webchangedetector-update-settings9533.5234.8327.03
Auto Detection /wp-admin/admin.php?page=webchangedetector-auto-settings9533.2136.5925.27
Settings /wp-admin/admin.php?page=webchangedetector-settings9503.2337.4825.85
Logs /wp-admin/admin.php?page=webchangedetector-logs9473.5435.1128.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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

SRP 0% 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
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/webchangedetector/admin/partials/templates/update-detection/update-step-tiles.php
    • > /wp-content/plugins/webchangedetector/public/partials/webchangedetector-public-display.php
    • > /wp-content/plugins/webchangedetector/admin/partials/templates/update-detection/update-step-cancel.php
    • > /wp-content/plugins/webchangedetector/admin/partials/templates/css-settings.php
    • > /wp-content/plugins/webchangedetector/admin/partials/templates/update-settings.php
    • > /wp-content/plugins/webchangedetector/admin/partials/templates/account.php
  • 81× 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/webchangedetector/admin/partials/templates/show-change-detection.php on line 9
    • > PHP Notice
      Undefined variable: wcd in wp-content/plugins/webchangedetector/admin/partials/templates/update-detection/update-step-processing-sc.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/webchangedetector/admin/partials/templates/account.php on line 10
    • > PHP Notice
      Undefined variable: step in wp-content/plugins/webchangedetector/admin/partials/templates/update-detection/update-step-settings.php on line 4
    • > PHP Notice
      Undefined variable: progress_setting in wp-content/plugins/webchangedetector/admin/partials/templates/update-detection/update-step-tiles.php on line 3
    • > PHP Notice
      Undefined variable: progress_pre in wp-content/plugins/webchangedetector/admin/partials/templates/update-detection/update-step-tiles.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/webchangedetector/admin/partials/templates/show-change-detection.php on line 9
    • > PHP Notice
      Undefined variable: wcd in wp-content/plugins/webchangedetector/admin/partials/templates/update-detection/update-step-change-detection.php on line 14
    • > PHP Notice
      Undefined variable: progress_setting in wp-content/plugins/webchangedetector/admin/partials/templates/update-detection/update-step-tiles.php on line 3
    • > PHP Notice
      Undefined variable: progress_change_detection in wp-content/plugins/webchangedetector/admin/partials/templates/update-detection/update-step-tiles.php on line 6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=
    • > Network (severe)
    wp-admin/admin.php?page= - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: check, changedetector, screenshot, compare, updates...

webchangedetector/webchangedetector.php 92% from 13 tests

The entry point to "WebChangeDetector" version 2.2.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 169 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
Everything looks great! No dangerous files found in this plugin4,212 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP324457062,741
JavaScript4203160793
CSS314157663
Bourne Shell13214
SVG1001

PHP code Passed 2 tests

Analyzing 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.55
Average class complexity29.00
▷ Minimum class complexity1.00
▷ Maximum class complexity192.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods64
▷ Static methods23.12%
▷ Public methods5992.19%
▷ Protected methods00.00%
▷ Private methods57.81%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants30
▷ Global constants2480.00%
▷ Class constants620.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon-wp-backend.png9.97KB1.05KB▼ 89.51%