62% flowgallery

Code Review | FlowGallery

WordPress plugin FlowGallery scored 62% from 54 tests.

About plugin

  • Plugin page: flowgallery
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-6.0
  • WordPress version: 6.3.1
  • First release: Nov 14, 2013
  • Latest release: May 25, 2022
  • Number of updates: 14
  • Update frequency: every 222.4 days
  • Top authors: klemmkeil (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,763 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.90MB] [CPU: ▼50.65ms] Passed 4 tests

Server-side resources used by FlowGallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.01 ▼34.34
Dashboard /wp-admin2.11 ▼1.206.04 ▼44.76
Posts /wp-admin/edit.php2.11 ▼1.256.67 ▼41.18
Add New Post /wp-admin/post-new.php2.11 ▼3.785.51 ▼82.31
Media Library /wp-admin/upload.php2.11 ▼1.125.13 ▼31.51

Server storage [IO: ▲0.94MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

FlowGallery: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,158 ▲42313.98 ▼0.6711.18 ▲9.4944.96 ▲5.47
Dashboard /wp-admin2,235 ▲525.96 ▲1.03122.63 ▼52.5443.53 ▲1.38
Posts /wp-admin/edit.php2,121 ▲322.44 ▲0.4440.42 ▲0.4035.12 ▼0.58
Add New Post /wp-admin/post-new.php1,523 ▼1917.85 ▼0.19611.34 ▲15.6248.60 ▼1.03
Media Library /wp-admin/upload.php1,414 ▲264.26 ▼0.0698.30 ▼1.7743.58 ▼3.30
FlowGallery /wp-admin/flowgallery-options.php260.440.1213.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > 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.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/flowgallery/thumbnail.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flowgallery/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flowgallery/options.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/flowgallery-options.php
    • > Network (severe)
    wp-admin/flowgallery-options.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Gallery in action) image missing
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === flowgallery === )
You can look at the official readme.txt

flowgallery/FlowGallery.php 92% from 13 tests

Analyzing the main PHP file in "FlowGallery" version 1.2
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("flowgallery.php" instead of "FlowGallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin2,414 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript95262691,830
CSS3624360
PHP34316224

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.78MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fancybox/fancybox_overlay.png0.98KB0.09KB▼ 90.43%
fancybox/fancybox_sprite.png1.33KB1.42KB0.00%
fancybox/fancybox_sprite@2x.png6.40KB5.76KB▼ 9.96%
screenshot-1.png784.01KB211.23KB▼ 73.06%
fancybox/helpers/fancybox_buttons.png1.05KB1.10KB0.00%