67% dream-gallery

Code Review | dream gallery

WordPress plugin dream gallery scored67%from 54 tests.

About plugin

  • Plugin page: dream-gallery
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 6.3.1
  • First release: Mar 26, 2021
  • Latest release: Mar 26, 2021
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: teamdream (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /516 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.07MB] [CPU: ▼3.41ms] Passed 4 tests

This is a short check of server-side resources used by dream gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.04 ▼2.18
Dashboard /wp-admin3.40 ▲0.0552.33 ▼9.28
Posts /wp-admin/edit.php3.52 ▲0.1657.09 ▲5.36
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.36 ▼5.74
Media Library /wp-admin/upload.php3.31 ▲0.0738.37 ▲3.55
Help /wp-admin/admin.php?page=help3.3035.72
Slider /wp-admin/admin.php?page=Dream-slider3.3035.68
Add New /wp-admin/admin.php?page=Add-new3.3037.16
Dream /wp-admin/admin.php?page=dream_gallery3.3132.26
All Galleries /wp-admin/admin.php?page=All-Galleries3.3232.63

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 36 new files
Database: 3 new tables, 6 new options
New tables
wp_images_two
wp_images
wp_images_three
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

dream gallery: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,988 ▲23114.99 ▲0.621.78 ▼0.4026.37 ▼27.00
Dashboard /wp-admin2,397 ▲2096.49 ▲1.61134.93 ▲18.0348.77 ▲6.72
Posts /wp-admin/edit.php2,298 ▲2093.37 ▲1.3557.20 ▲20.7541.41 ▲8.38
Add New Post /wp-admin/post-new.php1,706 ▲17322.70 ▼0.53649.56 ▼4.7440.40 ▼26.54
Media Library /wp-admin/upload.php1,437 ▲494.17 ▼0.1381.31 ▼21.8648.96 ▲2.84
Help /wp-admin/admin.php?page=help1,0543.0441.9363.92
Slider /wp-admin/admin.php?page=Dream-slider1,0493.0939.2837.18
Add New /wp-admin/admin.php?page=Add-new1,0433.1840.9947.93
Dream /wp-admin/admin.php?page=dream_gallery1,2553.2041.6842.15
All Galleries /wp-admin/admin.php?page=All-Galleries1,0093.0639.9726.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/dream-gallery/uninstall.php+19
    Trying to get property 'ID' of non-object
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+166
    Undefined variable: retrieved_data
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+158
    Trying to get property 'img_one' of non-object
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+159
    Trying to get property 'img_two' of non-object
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+160
    Trying to get property 'img_three' of non-object
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+161
    Trying to get property 'img_four' of non-object
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+162
    Trying to get property 'img_five' of non-object
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+163
    Trying to get property 'img_six' of non-object
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+164
    Trying to get property 'img_seven' of non-object
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+165
    Trying to get property 'img_eight' of non-object
    • > GET request to /wp-admin/admin.php?page=dream_gallery
    • > Notice in wp-content/plugins/dream-gallery/templates/admin.php+166
    Trying to get property 'img_nine' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 13× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/dream-gallery/templates/help.php
    • > /wp-content/plugins/dream-gallery/inc/Dreamplugin_deactivate.php
    • > /wp-content/plugins/dream-gallery/uninstall.php
    • > /wp-content/plugins/dream-gallery/templates/front_two.php
    • > /wp-content/plugins/dream-gallery/templates/slider_front.php
    • > /wp-content/plugins/dream-gallery/templates/Addnew.php
    • > /wp-content/plugins/dream-gallery/inc/Dreamplugin_activate.php
    • > /wp-content/plugins/dream-gallery/templates/admin.php
    • > /wp-content/plugins/dream-gallery/dreamgallery.php
    • > /wp-content/plugins/dream-gallery/templates/slider_admin.php

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)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Contributors: Contributors not specified
  • Screenshots: Screenshot #1 (This is the screenshot of admin section of dream slider (screenshot-1.jpg).) image required
The official readme.txt might help

dream-gallery/dreamgallery.php 77% from 13 tests

The primary PHP file in "dream gallery" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.6" instead of "5.2")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("dream-gallery.php" instead of "dreamgallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin14,165 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,240359,334
JavaScript61,0533933,550
PHP134411271,281

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods17.69%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected