83% folder-gallery

Code Review | Folder Gallery

WordPress plugin Folder Gallery scored83%from 54 tests.

About plugin

  • Plugin page: folder-gallery
  • Plugin version: 1.7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.0
  • WordPress version: 6.3.1
  • First release: Jan 5, 2013
  • Latest release: Nov 18, 2017
  • Number of updates: 93
  • Update frequency: every 19.1 days
  • Top authors: vjalby (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

1,000+ active /31,721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.29ms] Passed 4 tests

A check of server-side resources used by Folder Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.78 ▼1.39
Dashboard /wp-admin3.48 ▲0.1761.41 ▲6.18
Posts /wp-admin/edit.php3.59 ▲0.2354.21 ▲3.51
Add New Post /wp-admin/post-new.php6.06 ▲0.1791.37 ▼10.15
Media Library /wp-admin/upload.php3.40 ▲0.1737.63 ▼1.12
Folder Gallery /wp-admin/options-general.php?page=folder-gallery3.3733.48

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
FolderGallery

Browser metrics Passed 4 tests

A check of browser resources used by Folder Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.36 ▼0.011.71 ▼0.1843.54 ▲3.31
Dashboard /wp-admin2,202 ▲285.56 ▼0.1189.65 ▼9.3639.07 ▼10.41
Posts /wp-admin/edit.php2,104 ▲222.01 ▼0.0340.17 ▲5.8436.49 ▼1.66
Add New Post /wp-admin/post-new.php1,529 ▲123.14 ▼0.07671.68 ▼22.4852.78 ▼3.75
Media Library /wp-admin/upload.php1,407 ▲74.19 ▲0.0098.26 ▼28.3043.82 ▼11.31
Folder Gallery /wp-admin/options-general.php?page=folder-gallery1,1292.0022.6530.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/folder-gallery/foldergallery.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: lightbox, folder, gallery

folder-gallery/foldergallery.php 77% from 13 tests

The entry point to "Folder Gallery" version 1.7.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 389 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("folder-gallery.php" instead of "foldergallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,030 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP26875823
PO File17487154
JavaScript21047
CSS1106

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.36
Average class complexity183.00
▷ Minimum class complexity183.00
▷ Maximum class complexity183.00
Average method complexity10.58
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin