89% smart-gallery-dbgt

Code Review | Smart Gallery DBGT

WordPress plugin Smart Gallery DBGTscored89%from 54 tests.

About plugin

  • Plugin page: smart-gallery-dbgt
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 28, 2021
  • Latest release: Aug 21, 2023
  • Number of updates: 27
  • Update frequency: every 31.3 days
  • Top authors: gothamdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /829 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▲262.63ms] 75% from 4 tests

Server-side resources used by Smart Gallery DBGT
Please have a look at the following items
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 262.63ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.25319.64 ▲281.13
Dashboard /wp-admin3.56 ▲0.22335.38 ▲272.04
Posts /wp-admin/edit.php3.61 ▲0.26483.01 ▲435.95
Add New Post /wp-admin/post-new.php6.08 ▲0.20340.83 ▲244.48
Media Library /wp-admin/upload.php3.42 ▲0.19284.99 ▲252.87

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_puipui_dbgt_widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Smart Gallery DBGT: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17414.04 ▼0.345.17 ▲3.3240.35 ▼1.47
Dashboard /wp-admin2,232 ▲414.88 ▼0.9899.46 ▼7.8938.94 ▼3.15
Posts /wp-admin/edit.php2,115 ▲231.97 ▼0.0737.58 ▼1.1334.35 ▼1.18
Add New Post /wp-admin/post-new.php1,380 ▼13418.95 ▲1.54537.07 ▼131.9856.76 ▲2.74
Media Library /wp-admin/upload.php1,417 ▲264.23 ▲0.0398.07 ▼4.0940.21 ▼3.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_puipui_dbgt_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === Smart Gallery DBGT=== )
You can look at the official readme.txt

smart-gallery-dbgt/dbgt.php 85% from 13 tests

"Smart Gallery DBGT" version 1.1.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("smart-gallery-dbgt.php" instead of "dbgt.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 383 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,173 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4313116994
JavaScript2144161
SVG20018

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/search.png0.37KB0.38KB0.00%