10% gallerio

Code Review | Gallerio

WordPress plugin Gallerio scored10%from 54 tests.

About plugin

  • Plugin page: gallerio
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4.2
  • WordPress version: 6.3.1
  • First release: Sep 2, 2014
  • Latest release: Mar 26, 2016
  • Number of updates: 19
  • Update frequency: every 30.1 days
  • Top authors: subhasis005 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,754 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/gallerio/class/phpthumb.class.php+540
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼0.43MB] [CPU: ▼57.80ms] Passed 4 tests

Analyzing server-side resources used by Gallerio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1110.40 ▼36.76
Dashboard /wp-admin3.59 ▲0.2512.03 ▼53.95
Posts /wp-admin/edit.php3.60 ▲0.2411.91 ▼39.82
Add New Post /wp-admin/post-new.php3.60 ▼2.3010.48 ▼100.68
Media Library /wp-admin/upload.php3.60 ▲0.3617.48 ▼20.04
Usage Guide /wp-admin/admin.php?page=guide3.6010.16
Gallerio /wp-admin/admin.php?page=welcome3.6013.64
Bulk Upload Pictures /wp-admin/admin.php?page=bulk-upload-pictures3.6010.18
Gallery /wp-admin/admin.php?page=gallerio3.6010.17
Upload Pictures /wp-admin/admin.php?page=upload-pictures3.609.26
Settings /wp-admin/admin.php?page=settings3.6011.48

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: 3 new tables, 6 new options
New tables
wp_gallerio
wp_gallerio_images
wp_gallerio_config
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Gallerio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲6414.75 ▲0.112.11 ▲0.1548.40 ▲8.43
Dashboard /wp-admin2,241 ▲564.84 ▼1.00109.63 ▲7.0240.49 ▼4.30
Posts /wp-admin/edit.php2,124 ▲352.06 ▲0.0734.82 ▼6.5239.21 ▲3.24
Add New Post /wp-admin/post-new.php1,556 ▲3723.09 ▼0.02644.38 ▼27.4754.36 ▼4.77
Media Library /wp-admin/upload.php1,426 ▲384.22 ▼0.0197.59 ▼9.5745.10 ▲0.62
Usage Guide /wp-admin/admin.php?page=guide1,0622.0326.5553.20
Gallerio /wp-admin/admin.php?page=welcome8061.6825.4339.85
Bulk Upload Pictures /wp-admin/admin.php?page=bulk-upload-pictures7752.0623.3820.86
Gallery /wp-admin/admin.php?page=gallerio9112.0323.6134.22
Upload Pictures /wp-admin/admin.php?page=upload-pictures9901.7729.6040.43
Settings /wp-admin/admin.php?page=settings1,0101.7127.3033.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/gallerio/class/phpthumb.class.php+540
    Array and string offset access syntax with curly braces is deprecated
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 72 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings
    • > Deprecated in wp-content/plugins/gallerio/class/phpthumb.functions.php+990
    Array and string offset access syntax with curly braces is deprecated
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings
    • > Deprecated in wp-content/plugins/gallerio/class/phpthumb.class.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; phpthumb has a deprecated constructor
  • 78 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings
    • > Deprecated in wp-content/plugins/gallerio/gallerio.php+27
    Function create_function() is deprecated
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upload-pictures
    • > Notice in wp-content/plugins/gallerio/gallerio.php+1107
    Undefined index: gallery_id
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings
    • > Notice in wp-content/plugins/gallerio/gallerio.php+1402
    Undefined index: mode
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings
    • > Notice in wp-content/plugins/gallerio/gallerio.php+1304
    Undefined variable: action
    • > GET request to /wp-admin/admin.php?page=upload-pictures
    • > Notice in wp-content/plugins/gallerio/gallerio.php+839
    Trying to get property 'gallery' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× 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/gallerio/gallerio.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

gallerio/gallerio.php Passed 13 tests

"Gallerio" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
A simple yet powerful gallery plugin for Wordpress

Code Analysis 95% from 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 plugin7,949 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP41,4925307,088
JavaScript120277812
CSS151649

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,037)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 236)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity501.00
▷ Minimum class complexity171.00
▷ Maximum class complexity1,037.00
Average method complexity12.03
▷ Minimum method complexity1.00
▷ Maximum method complexity236.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods136
▷ Static methods4230.88%
▷ Public methods136100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
no_img.png2.35KB1.33KB▼ 43.44%
css/images/loading_background.png0.13KB0.15KB0.00%
css/images/controls.png1.23KB1.28KB0.00%
css/images/overlay.png0.11KB0.15KB0.00%
css/images/border.png0.07KB0.10KB0.00%