78% ts-comfort-database

Code Review | TS Comfort DB

WordPress plugin TS Comfort DB scored78%from 54 tests.

About plugin

  • Plugin page: ts-comfort-database
  • Plugin version: 2.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Nov 4, 2017
  • Latest release: Aug 2, 2022
  • Number of updates: 56
  • Update frequency: every 30.9 days
  • Top authors: tsinf (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /3,535 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.68MB] [CPU: ▲7.13ms] Passed 4 tests

An overview of server-side resources used by TS Comfort DB
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6348.99 ▲9.41
Dashboard /wp-admin4.03 ▲0.7360.41 ▲6.63
Posts /wp-admin/edit.php4.08 ▲0.7364.34 ▲13.23
Add New Post /wp-admin/post-new.php6.56 ▲0.68100.75 ▼0.77
Media Library /wp-admin/upload.php3.90 ▲0.6750.45 ▲13.81
Database /wp-admin/admin.php?page=tscomfortdb-mainpage3.9455.59
Settings /wp-admin/admin.php?page=tscomfortdb-settings3.8642.80
File Manager /wp-admin/admin.php?page=tscomfortdb-filemanager3.8742.54
Global Post Search /wp-admin/admin.php?page=tsinf_comfortdb_plugin_post_search3.8639.07
SQL Export BETA /wp-admin/admin.php?page=tsinf_database_exporter_plugin_page3.9352.51

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

Input-output and database impact of this plugin
Please fix the following
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/ts-comfort-database/" and "wp-content/uploads/"
    • (new file) wp-content/ts-plugins/ts-comfort-database/.empty
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by TS Comfort DB
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12214.35 ▼0.001.92 ▲0.1040.52 ▼4.80
Dashboard /wp-admin2,289 ▲1125.01 ▼0.6690.44 ▼11.1783.86 ▲36.97
Posts /wp-admin/edit.php2,195 ▲922.56 ▲0.6241.11 ▲3.6636.20 ▲0.79
Add New Post /wp-admin/post-new.php1,614 ▲8821.05 ▼2.60706.52 ▲48.6131.48 ▼23.06
Media Library /wp-admin/upload.php1,488 ▲854.50 ▲0.27106.05 ▲6.5971.24 ▲24.05
Database /wp-admin/admin.php?page=tscomfortdb-mainpage3,8042.0534.5752.98
Settings /wp-admin/admin.php?page=tscomfortdb-settings9732.0727.0027.26
File Manager /wp-admin/admin.php?page=tscomfortdb-filemanager9331.8227.5328.14
Global Post Search /wp-admin/admin.php?page=tsinf_comfortdb_plugin_post_search1,1741.8226.5927.87
SQL Export BETA /wp-admin/admin.php?page=tsinf_database_exporter_plugin_page3,7082.89247.8973.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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 0% 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ts-comfort-database/checker.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined index: hash in wp-content/plugins/ts-comfort-database/checker.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/ts-comfort-database/plugin.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ts-comfort-database/classes/tsinf_comfort_db_exporter.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ts-comfort-database/classes/tsinf_comfort_post_search.php:42
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ts-comfort-database/plugin.php on line 37
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/ts-comfort-database/plugin.php on line 37

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6, #7 in ts-comfort-database/assets to your readme.txt
You can look at the official readme.txt

ts-comfort-database/plugin.php 92% from 13 tests

The primary PHP file in "TS Comfort DB" version 2.0.7 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ts-comfort-database.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin6,131 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP96705273,215
CSS8291291,690
JavaScript92056903
PO File1141208321
SVG2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity98.50
▷ Minimum class complexity1.00
▷ Maximum class complexity318.00
Average method complexity6.80
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods90
▷ Static methods7785.56%
▷ Public methods7280.00%
▷ Protected methods00.00%
▷ Private methods1820.00%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants9
▷ Global constants9100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Comfort-SQLite-Logo.png3.65KB1.83KB▼ 49.79%
images/Comfort-SQLite-Logo16x16.png0.46KB0.52KB0.00%