10% db-manager

Code Review | DB Manager

WordPress plugin DB Manager scored10%from 54 tests.

About plugin

  • Plugin page: db-manager
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.4
  • WordPress version: 6.3.1
  • First release: Jun 5, 2020
  • Latest release: Jun 5, 2020
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: therajibhossain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /500 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'DBManager\Admin' does not have a method 'plugin_activate'

Server metrics [RAM: ▲0.16MB] [CPU: ▼3.87ms] Passed 4 tests

An overview of server-side resources used by DB Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0537.42 ▼1.73
Dashboard /wp-admin3.49 ▲0.1848.27 ▼0.01
Posts /wp-admin/edit.php3.60 ▲0.2546.63 ▼0.46
Add New Post /wp-admin/post-new.php6.09 ▲0.2090.31 ▼13.29
Media Library /wp-admin/upload.php3.41 ▲0.1838.96 ▲5.87
DB Manager /wp-admin/options-general.php?page=db-manager3.3831.06

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for DB Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.39 ▼0.931.65 ▼0.0942.37 ▲0.94
Dashboard /wp-admin2,216 ▲284.88 ▼0.00109.68 ▼2.7741.42 ▼1.79
Posts /wp-admin/edit.php2,099 ▲102.07 ▲0.0640.64 ▲3.4640.21 ▲8.08
Add New Post /wp-admin/post-new.php1,677 ▲15822.81 ▼0.36589.60 ▼49.7164.38 ▲11.63
Media Library /wp-admin/upload.php1,398 ▲104.19 ▲0.0193.33 ▼4.2846.35 ▲2.01
DB Manager /wp-admin/options-general.php?page=db-manager8831.7827.6631.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'DBManager\Admin' does not have a method 'plugin_deactivate'
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/db-manager/db-manager.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Add descriptions for screenshots #1, #2 in db-manager/assets to your readme.txt
Please take inspiration from this readme.txt

db-manager/db-manager.php 85% from 13 tests

The main PHP file in "DB Manager" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.4" instead of "5.0.0")
  • Domain Path: The domain path folder does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,480 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12154241984
SVG100394
JavaScript14660
CSS271234
JSON2008

PHP code Passed 2 tests

Analyzing 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.46
Average class complexity26.33
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods57
▷ Static methods1628.07%
▷ Public methods4680.70%
▷ Protected methods00.00%
▷ Private methods1119.30%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) banner-772x250.png36.26KB0.00KB▼ 100.00%