73% wpvivid-snapshot-database

Code Review | Database Snapshots - WPvivid

WordPress plugin Database Snapshots - WPvivid scored73%from 54 tests.

About plugin

  • Plugin page: wpvivid-snapshot-...
  • Plugin version: 0.9.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Aug 18, 2022
  • Latest release: Apr 11, 2023
  • Number of updates: 12
  • Update frequency: every 19.8 days
  • Top authors: wpvivid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /9,102 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.24MB] [CPU: ▼3.69ms] Passed 4 tests

Analyzing server-side resources used by Database Snapshots - WPvivid
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1435.84 ▼3.79
Dashboard /wp-admin3.57 ▲0.2647.04 ▼2.52
Posts /wp-admin/edit.php3.68 ▲0.3249.51 ▲0.61
Add New Post /wp-admin/post-new.php6.17 ▲0.2882.75 ▼9.06
Media Library /wp-admin/upload.php3.49 ▲0.2640.29 ▲8.09

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wp_wpvivid_options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Database Snapshots - WPvivid
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.41 ▼1.011.80 ▼0.0241.65 ▼6.45
Dashboard /wp-admin2,225 ▲345.19 ▲0.30100.34 ▼16.2641.80 ▼2.88
Posts /wp-admin/edit.php2,113 ▲242.62 ▲0.5838.15 ▲2.1033.12 ▼5.52
Add New Post /wp-admin/post-new.php6,278 ▲4,75024.25 ▲6.23893.30 ▲238.5949.12 ▼16.10
Media Library /wp-admin/upload.php1,410 ▲224.45 ▲0.13100.95 ▲0.2241.31 ▼3.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_wpvivid_options
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just 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 plugin_dir_path() in wp-content/plugins/wpvivid-snapshot-database/wpvivid-snapshot-database.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #2 (Restore the site from a snapshot), #3 (WPvivid Database Snapshots settings)
Please take inspiration from this readme.txt

wpvivid-snapshot-database/wpvivid-snapshot-database.php 85% from 13 tests

"Database Snapshots - WPvivid" version 0.9.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected3,794 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP7372402,629
CSS210237945
JavaScript21429220

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity28.67
▷ Minimum class complexity4.00
▷ Maximum class complexity53.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods80
▷ Static methods00.00%
▷ Public methods7695.00%
▷ Protected methods33.75%
▷ Private methods11.25%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected