10% gallery-without-the-fluff

Code Review | Gallery without the Fluff

WordPress plugin Gallery without the Fluff scored10%from 54 tests.

About plugin

  • Plugin page: gallery-without-t...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6
  • WordPress version: 6.3.1
  • First release: Mar 1, 2013
  • Latest release: Sep 20, 2013
  • Number of updates: 16
  • Update frequency: every 13.9 days
  • Top authors: j@revive (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /4,669 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/gallery-without-the-fluff/gallery-plugin.php+63
    Use of undefined constant is_admin - assumed 'is_admin' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.94MB] [CPU: ▼57.23ms] Passed 4 tests

An overview of server-side resources used by Gallery without the Fluff
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.4115.62 ▼27.23
Dashboard /wp-admin2.08 ▼1.275.53 ▼60.92
Posts /wp-admin/edit.php2.08 ▼1.285.77 ▼40.92
Add New Post /wp-admin/post-new.php2.08 ▼3.815.76 ▼95.37
Media Library /wp-admin/upload.php2.08 ▼1.157.73 ▼31.69
Settings (Admin) /wp-admin/upload.php?page=gallery-settings2.086.73
Images into Gallery /wp-admin/upload.php?page=gallery-images-to-gallery2.087.45
Add Gallery /wp-admin/edit-tags.php?taxonomy=gallery&post_type=attachment2.085.43

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 9 new options
New WordPress options
fluff_after_loop
widget_recent-comments
fluff_before_loop
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
fluff_in_loop
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Gallery without the Fluff
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.29 ▼0.501.98 ▼0.2543.12 ▼0.06
Dashboard /wp-admin2,207 ▲305.62 ▲0.0392.82 ▼8.3038.81 ▼7.77
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0339.00 ▲4.0638.13 ▼2.51
Add New Post /wp-admin/post-new.php1,535 ▲923.52 ▲0.41653.33 ▼37.0065.35 ▲12.43
Media Library /wp-admin/upload.php1,429 ▲294.23 ▲0.03101.88 ▼14.8544.75 ▼4.78
Settings (Admin) /wp-admin/upload.php?page=gallery-settings1,0351.8724.8140.14
Images into Gallery /wp-admin/upload.php?page=gallery-images-to-gallery8551.7825.9525.09
Add Gallery /wp-admin/edit-tags.php?taxonomy=gallery&post_type=attachment1,3192.1227.3434.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/gallery-without-the-fluff/gallery-plugin.php+63
    Use of undefined constant is_admin - assumed 'is_admin' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • fluff_after_loop
    • widget_recent-comments
    • fluff_in_loop
    • widget_recent-posts
    • theysaidso_admin_options
    • fluff_before_loop
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=gallery&post_type=attachment
    • > Warning in wp-content/plugins/gallery-without-the-fluff/gallery-plugin.php+63
    Use of undefined constant is_admin - assumed 'is_admin' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=gallery&post_type=attachment
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/upload.php?page=gallery-settings
    • > Notice in wp-content/plugins/gallery-without-the-fluff/php/help.php+90
    Undefined index: content
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=gallery-images-to-gallery
    • > Notice in wp-content/plugins/gallery-without-the-fluff/php/menu.php+172
    Undefined variable: message

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-without-the-fluff/php/admin-functions.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gallery-without-the-fluff/gallery-plugin.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-without-the-fluff/php/update-order-option.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-without-the-fluff/php/help.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-without-the-fluff/php/menu.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-without-the-fluff/php/functions.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

gallery-without-the-fluff/gallery-plugin.php 85% from 13 tests

The primary PHP file in "Gallery without the Fluff" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gallery-without-the-fluff.php" instead of "gallery-plugin.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 195 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
There were no executable files found in this plugin846 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10258400723
CSS21212108
JavaScript141015

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin