78% cleaner-gallery

Code Review | Cleaner Gallery

WordPress plugin Cleaner Gallery scored 78% from 54 tests.

About plugin

  • Plugin page: cleaner-gallery
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9+
  • WordPress version: 6.3.1
  • First release: Mar 5, 2009
  • Latest release: Jul 11, 2014
  • Number of updates: 24
  • Update frequency: every 81.5 days
  • Top authors: greenshady (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

3,000+ active / 213,275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼7.05ms] Passed 4 tests

A check of server-side resources used by Cleaner Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.15 ▼6.33
Dashboard /wp-admin3.45 ▲0.1444.29 ▼8.63
Posts /wp-admin/edit.php3.56 ▲0.2052.08 ▲9.33
Add New Post /wp-admin/post-new.php6.03 ▲0.1483.84 ▼14.42
Media Library /wp-admin/upload.php3.37 ▲0.1435.81 ▲1.17
Cleaner Gallery /wp-admin/themes.php?page=cleaner-gallery3.4531.62

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Cleaner Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7414.80 ▲0.381.96 ▼0.0638.66 ▼9.49
Dashboard /wp-admin2,213 ▲285.83 ▼0.0295.35 ▼2.1037.49 ▼8.06
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0539.03 ▲2.5735.13 ▲2.74
Add New Post /wp-admin/post-new.php1,536 ▲1723.24 ▲0.14663.44 ▼20.3658.87 ▲1.51
Media Library /wp-admin/upload.php1,389 ▼24.19 ▼0.01105.14 ▲2.9043.94 ▼3.69
Cleaner Gallery /wp-admin/themes.php?page=cleaner-gallery1,1272.0227.6528.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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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
Please fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=cleaner-gallery
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=cleaner-gallery
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cleaner-gallery/inc/gallery.php:96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cleaner-gallery/cleaner-gallery.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cleaner-gallery/inc/default-filters.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cleaner-gallery/admin/admin.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Gallery from the [Socially Awkward theme](http://wordpress.org/themes/socially-awkward).), #2 (Gallery from the [Chun theme](http://wordpress.org/themes/chun).), #3 (Gallery from the [Picturesque theme](http://wordpress.org/themes/picturesque).), #4 (Cleaner Gallery settings page.)
You can take inspiration from this readme.txt

cleaner-gallery/cleaner-gallery.php 92% from 13 tests

The principal PHP file in "Cleaner Gallery" v. 1.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 226 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin711 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4223497538
Markdown130099
CSS210574

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity20.00
▷ Minimum class complexity6.00
▷ Maximum class complexity34.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods19
▷ Static methods210.53%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png22.39KB22.32KB0.31%