68% wp-cloud-gallery

Code Review | WordPress Cloud Gallery – Responsive Photo and Video Galleries with CDN

WordPress plugin WordPress Cloud Gallery – Responsive Photo and Video Galleries with CDN scored68%from 54 tests.

About plugin

  • Plugin page: wp-cloud-gallery
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 17, 2019
  • Latest release: Oct 10, 2023
  • Number of updates: 39
  • Update frequency: every 44.4 days
  • Top authors: wpcloudgallery (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /1,461 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.92MB] [CPU: ▼55.72ms] Passed 4 tests

A check of server-side resources used by WordPress Cloud Gallery – Responsive Photo and Video Galleries with CDN
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.57 ▼36.47
Dashboard /wp-admin2.08 ▼1.226.40 ▼41.50
Posts /wp-admin/edit.php2.08 ▼1.275.22 ▼51.98
Add New Post /wp-admin/post-new.php2.08 ▼3.806.51 ▼92.91
Media Library /wp-admin/upload.php2.08 ▼1.145.94 ▼31.92
API Key /wp-admin/admin.php?page=wpcloudgallery_settings_page_apikey2.085.67
SmugMug /wp-admin/admin.php?page=wpcloudgallery_settings_page_smugmug2.087.19
YouTube /wp-admin/admin.php?page=wpcloudgallery_settings_page_youtube2.088.41
CloudGallery /wp-admin/admin.php?page=wpcloudgallery_settings_page2.085.85

Server storage [IO: ▲0.04MB] [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: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WordPress Cloud Gallery – Responsive Photo and Video Galleries with CDN: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16113.45 ▼0.909.55 ▲7.8847.55 ▲7.58
Dashboard /wp-admin2,252 ▲725.64 ▼0.0686.94 ▼3.6639.77 ▼6.55
Posts /wp-admin/edit.php2,154 ▲542.00 ▲0.0336.83 ▲0.9635.24 ▼1.70
Add New Post /wp-admin/post-new.php1,551 ▲2323.56 ▲0.51697.09 ▲41.4854.39 ▼2.01
Media Library /wp-admin/upload.php1,454 ▲544.22 ▼0.07102.40 ▼1.5047.26 ▲3.41
API Key /wp-admin/admin.php?page=wpcloudgallery_settings_page_apikey9212.0129.8235.70
SmugMug /wp-admin/admin.php?page=wpcloudgallery_settings_page_smugmug1,2114.0378.7675.57
YouTube /wp-admin/admin.php?page=wpcloudgallery_settings_page_youtube1,4834.1054.5655.50
CloudGallery /wp-admin/admin.php?page=wpcloudgallery_settings_page1,2233.7282.9273.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcloudgallery_settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcloudgallery_settings_page_apikey
    • > Notice in wp-content/plugins/wp-cloud-gallery/wpcl-apikey.php+19
    Undefined variable: wpcloudgallery_active_tab
    • > GET request to /wp-admin/admin.php?page=wpcloudgallery_settings_page_apikey
    • > Notice in wp-content/plugins/wp-cloud-gallery/wpcl-apikey.php+57
    Undefined variable: confirmSave

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
The following issues need your attention
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-cloud-gallery/wpcl-youtube.php
    • > /wp-content/plugins/wp-cloud-gallery/wpcl-main.php
    • > /wp-content/plugins/wp-cloud-gallery/wpcl-smugmug.php
    • > /wp-content/plugins/wp-cloud-gallery/wpcl-apikey.php
    • > /wp-content/plugins/wp-cloud-gallery/wpcloudgallery.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)
Everything seems fine, but this is not an exhaustive test

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 need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-cloud-gallery/wpcloudgallery.php 85% from 13 tests

This is the main PHP file of "WordPress Cloud Gallery – Responsive Photo and Video Galleries with CDN" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-cloud-gallery.php" instead of "wpcloudgallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin524 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP528531524

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin