62% filesfm-gallery

Code Review | Photo gallery, image gallery, video gallery, file gallery plugin with cloud storage

WordPress plugin Photo gallery, image gallery, video gallery, file gallery plugin with cloud storage scored62%from 54 tests.

About plugin

  • Plugin page: filesfm-gallery
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2016
  • Latest release: Jul 6, 2020
  • Number of updates: 11
  • Update frequency: every 119.9 days
  • Top authors: Files.fm (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /2,778 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.23MB] [CPU: ▼48.05ms] Passed 4 tests

This is a short check of server-side resources used by Photo gallery, image gallery, video gallery, file gallery plugin with cloud storage
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7213.46 ▼26.16
Dashboard /wp-admin2.78 ▼0.5215.78 ▼39.45
Posts /wp-admin/edit.php2.78 ▼0.5715.64 ▼35.92
Add New Post /wp-admin/post-new.php2.78 ▼3.1018.16 ▼90.67
Media Library /wp-admin/upload.php2.78 ▼0.4419.64 ▼23.02
Upload new gallery /wp-admin/admin.php?page=files-fm-gallery-new-gallery2.7814.78
Files.fm Gallery /wp-admin/admin.php?page=files-fm-gallery--upload-list2.7819.35

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Photo gallery, image gallery, video gallery, file gallery plugin with cloud storage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,993 ▲23213.67 ▼0.715.45 ▲3.0142.21 ▲3.29
Dashboard /wp-admin2,271 ▲764.98 ▼0.00101.62 ▼18.7595.43 ▲49.19
Posts /wp-admin/edit.php2,156 ▲562.01 ▼0.0436.44 ▼5.0833.61 ▼4.37
Add New Post /wp-admin/post-new.php1,571 ▲4623.17 ▲5.77815.97 ▲111.4583.08 ▲2.59
Media Library /wp-admin/upload.php1,444 ▲474.25 ▲0.00115.98 ▼2.2777.34 ▲29.94
Upload new gallery /wp-admin/admin.php?page=files-fm-gallery-new-gallery1,58116.39556.68144.47
Files.fm Gallery /wp-admin/admin.php?page=files-fm-gallery--upload-list1,57512.61502.3054.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=files-fm-gallery--upload-list
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

SRP 50% 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filesfm-gallery/files-fm-gallery-module.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=files-fm-gallery-new-gallery
    • > Console-api (warning) in unknown
    https://apis.google.com/_/scs/abc-static/_/js/k=gapi.lb.en.AOzoyjtjrhQ.O/m=client/rt=j/sv=1/d=1/ed=1/rs=AHpOoo9-fA1P7IZFa1fdRj158NoDqrnbYA/cb=gapi.loaded_0?le=scs 395:208 "Your client application uses libraries for user authentication or authorization that are deprecated. See the [Migration Guide](https://developers.google.com/identity/gsi/web/guides/gis-migration) for more information."

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: gallery, cloud storage, photo gallery, image gallery, video gallery

filesfm-gallery/files-fm-gallery-module.php 92% from 13 tests

This is the main PHP file of "Photo gallery, image gallery, video gallery, file gallery plugin with cloud storage" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("filesfm-gallery.php" instead of "files-fm-gallery-module.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected350 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP17720254
JavaScript112089
CSS1007

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/cloud.png0.79KB0.87KB0.00%