10% fw-gallery

Code Review | FW Gallery - Photo, video, audio media presentation and management system with players and slideshow

WordPress plugin FW Gallery - Photo, video, audio media presentation and management system with players and slideshow scored 10% from 54 tests.

About plugin

  • Plugin page: fw-gallery
  • Plugin version: 6.6.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2021
  • Latest release: Jul 17, 2021
  • Number of updates: 3
  • Update frequency: every 6.3 days
  • Top authors: fastw3b (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 477 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/fw-gallery/fw-gallery.php+45
    Undefined variable: adaptor

Server metrics [RAM: ▲1.26MB] [CPU: ▲2.73ms] Passed 4 tests

An overview of server-side resources used by FW Gallery - Photo, video, audio media presentation and management system with players and slideshow
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.49 ▲1.0348.26 ▲7.03
Dashboard /wp-admin4.64 ▲1.3352.12 ▲2.63
Posts /wp-admin/edit.php4.69 ▲1.3357.96 ▲13.51
Add New Post /wp-admin/post-new.php7.22 ▲1.33105.39 ▼9.47
Media Library /wp-admin/upload.php4.56 ▲1.3341.76 ▲10.73
Categories /wp-admin/admin.php?page=fwmg-category4.7538.53
Tags /wp-admin/admin.php?page=fwmg-tag4.6237.84
Data Management /wp-admin/admin.php?page=fwmg-data4.6942.26
Dashboard /wp-admin/admin.php?page=fwmg-fwgallery5.0840.33
Add-ons /wp-admin/admin.php?page=fwmg-addon4.8438.84
Files /wp-admin/admin.php?page=fwmg-file4.7640.35
Settings /wp-admin/admin.php?page=fwmg-configuration4.6038.23
Translations /wp-admin/admin.php?page=fwmg-translation4.7538.36
CSS Styles /wp-admin/admin.php?page=fwmg-css4.6035.80

Server storage [IO: ▲19.13MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 573 new files
Database: 13 new tables, 6 new options
New tables
wp_fwsg_file_image
wp_fwsg_category_tag
wp_fwsg_file_location
wp_fwsg_file_video
wp_fwsg_file
wp_fwsg_tag
wp_viewlevels
wp_fwsg_file_audio
wp_fwsg_file_vote
wp_extensions
...
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

A check of browser resources used by FW Gallery - Photo, video, audio media presentation and management system with players and slideshow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲12113.28 ▼1.531.79 ▼0.0843.88 ▼4.60
Dashboard /wp-admin2,250 ▲625.87 ▲1.00105.92 ▼9.4080.97 ▲33.46
Posts /wp-admin/edit.php2,151 ▲622.00 ▲0.0037.91 ▲1.2335.41 ▲0.44
Add New Post /wp-admin/post-new.php1,563 ▲2721.88 ▼1.30727.58 ▲48.8057.88 ▲2.82
Media Library /wp-admin/upload.php1,444 ▲564.15 ▼0.08115.12 ▲2.9050.23 ▲1.18
Categories /wp-admin/admin.php?page=fwmg-category7101.146.4414.80
Tags /wp-admin/admin.php?page=fwmg-tag7101.147.7415.44
Data Management /wp-admin/admin.php?page=fwmg-data7191.146.8717.16
Dashboard /wp-admin/admin.php?page=fwmg-fwgallery7191.536.8523.94
Add-ons /wp-admin/admin.php?page=fwmg-addon7101.536.6416.62
Files /wp-admin/admin.php?page=fwmg-file7101.536.5920.15
Settings /wp-admin/admin.php?page=fwmg-configuration7101.536.6815.34
Translations /wp-admin/admin.php?page=fwmg-translation7101.146.6715.56
CSS Styles /wp-admin/admin.php?page=fwmg-css7101.536.3615.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 13 tables
    • wp_viewlevels
    • wp_fwsg_file_image
    • wp_fwsg_category
    • wp_fwsg_category_tag
    • wp_fwsg_file_tag
    • wp_extensions
    • wp_fwsg_file_location
    • wp_fwsg_file_vote
    • wp_fwsg_file_file
    • wp_fwsg_file_video
    • ...
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=fwmg-fwgallery
    • > User deprecated in wp-includes/functions.php+5737
    Function WP_User->id was called with an argument that is deprecated since version 2.1.0! Use WP_User->ID instead.

SRP 0% 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
Please fix the following items
  • 143× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/fw-gallery/site/layouts/common/grids/standard.php
    • > /wp-content/plugins/fw-gallery/site/views/item/view.html.php
    • > /wp-content/plugins/fw-gallery/admin/models/file.php
    • > /wp-content/plugins/fw-gallery/admin/layouts/addons/plg_fwgallery_meta/onshowconfigextracards.php
    • > /wp-content/plugins/fw-gallery/admin/views/fwgallery/tmpl/get_changelog.php
    • > /wp-content/plugins/fw-gallery/admin/layouts/addons/plg_fwgallery_map/modal_advert.php
    • > /wp-content/plugins/fw-gallery/site/models/fwgallery.php
    • > /wp-content/plugins/fw-gallery/site/layouts/common/listing/category_custom.php
    • > /wp-content/plugins/fw-gallery/admin/views/category/view.html.php
    • > /wp-content/plugins/fw-gallery/admin/layouts/utilites/quickcategories.php
  • 2× 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/fw-gallery/helpers/connector.php:278
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fw-gallery/fw-gallery.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: news, slideshow, portfolio, media, video...

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

The main PHP file in "FW Gallery - Photo, video, audio media presentation and management system with players and slideshow" ver. 6.6.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 182 characters long)

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
No dangerous file extensions were detected92,072 lines of code in 205 files:
LanguageFilesBlank linesComment linesLines of code
SVG602050,392
PHP1471,4271,16423,950
CSS121,39916012,644
JavaScript235621,5883,154
INI53801,649
XML620148
SQL1100127
HTML5008

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity22.11
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity97.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes112
▷ Abstract classes00.00%
▷ Concrete classes112100.00%
▷ Final classes00.00%
Methods632
▷ Static methods21834.49%
▷ Public methods62999.53%
▷ Protected methods30.47%
▷ Private methods00.00%
Functions37
▷ Named functions3594.59%
▷ Anonymous functions25.41%
Constants39
▷ Global constants39100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.09MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/jui/img/glyphicons-halflings.png12.30KB10.35KB▼ 15.88%
admin/assets/images/delete16.png0.92KB1.02KB0.00%
site/assets/images/video-play.png0.80KB1.05KB0.00%
media/jui/css/chosen-sprite.png0.53KB0.88KB0.00%
admin/assets/images/fw_thankyou_install.png30.28KB15.51KB▼ 48.79%