10% google-picasa-albums-viewer

Code Review | Google Photos Gallery with Shortcodes

WordPress plugin Google Photos Gallery with Shortcodes scored 10% from 54 tests.

About plugin

  • Plugin page: google-picasa-alb...
  • Plugin version: 4.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Jul 15, 2011
  • Latest release: Sep 6, 2023
  • Number of updates: 284
  • Update frequency: every 15.7 days
  • Top authors: nakunakifi (100%)

Code review

54 tests

User reviews

42 reviews

Install metrics

2,000+ active / 134,170 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure had errors
    • > User error in wp-content/plugins/google-picasa-albums-viewer/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 7.4.16.

Server metrics [RAM: ▼1.96MB] [CPU: ▼57.29ms] Passed 4 tests

Analyzing server-side resources used by Google Photos Gallery with Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.24 ▼42.04
Dashboard /wp-admin2.05 ▼1.266.22 ▼41.68
Posts /wp-admin/edit.php2.05 ▼1.315.26 ▼47.00
Add New Post /wp-admin/post-new.php2.05 ▼3.847.19 ▼98.43
Media Library /wp-admin/upload.php2.05 ▼1.185.52 ▼26.46

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 1,503 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Photos Gallery with Shortcodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,062 ▲32713.75 ▼0.997.55 ▲5.7851.83 ▲2.80
Dashboard /wp-admin2,248 ▲635.86 ▲0.89100.58 ▼12.1542.98 ▼4.95
Posts /wp-admin/edit.php2,128 ▲392.00 ▼0.0534.83 ▼6.3332.87 ▼2.90
Add New Post /wp-admin/post-new.php1,555 ▲1918.14 ▼5.07623.63 ▼46.0749.89 ▼6.12
Media Library /wp-admin/upload.php1,427 ▲424.26 ▲0.0592.72 ▼10.6441.50 ▼0.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User error in wp-content/plugins/google-picasa-albums-viewer/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 7.4.16.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/google-picasa-albums-viewer/admin/partials/google-photos-albums-gallery-admin-display.php
    • > /wp-content/plugins/google-picasa-albums-viewer/public/partials/google-photos-albums-gallery-public-display.php
  • 799× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Math\\BigInteger\\Engines\\PHP\\Montgomery' not found in wp-content/plugins/google-picasa-albums-viewer/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Montgomery.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/google-picasa-albums-viewer/vendor/google/common-protos/src/Type/PhoneNumber.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/google-picasa-albums-viewer/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/google-picasa-albums-viewer/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php:4
    • > PHP Parse error
      syntax error, unexpected '|', expecting ';' or '{' in wp-content/plugins/google-picasa-albums-viewer/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php on line 39
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/google-picasa-albums-viewer/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Cache\\CacheException' not found in wp-content/plugins/google-picasa-albums-viewer/vendor/psr/cache/src/InvalidArgumentException.php:11
    • > PHP Warning
      Class 'Google\\Http\\MediaFileUpload' not found in wp-content/plugins/google-picasa-albums-viewer/vendor/google/apiclient/src/aliases.php on line 32
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/google-picasa-albums-viewer/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/google-picasa-albums-viewer/vendor/google/protobuf/src/Google/Protobuf/FloatValue.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
You can look at the official readme.txt

google-picasa-albums-viewer/google-photos-albums-gallery.php 85% from 13 tests

The principal PHP file in "Google Photos Gallery with Shortcodes" v. 4.0.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("google-picasa-albums-viewer.php" instead of "google-photos-albums-gallery.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin106,297 lines of code in 1,439 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,33120,56481,46495,289
Markdown502,39206,606
JSON36003,402
JavaScript475109353
CSS34513284
YAML5313156
XML53585
Protocol Buffers2143864
Python1132344
Bourne Shell24014

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.66
▷ Minimum class complexity1.00
▷ Maximum class complexity679.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces158
Interfaces54
Traits28
Classes1,233
▷ Abstract classes22117.92%
▷ Concrete classes1,01282.08%
▷ Final classes666.52%
Methods7,179
▷ Static methods1,07114.92%
▷ Public methods6,01783.81%
▷ Protected methods4746.60%
▷ Private methods6889.58%
Functions212
▷ Named functions4420.75%
▷ Anonymous functions16879.25%
Constants913
▷ Global constants90.99%
▷ Class constants90499.01%
▷ Public constants85094.03%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/css/lightbox/images/next.png1.32KB1.58KB0.00%
public/css/lightbox/images/close.png0.27KB0.29KB0.00%
public/css/lightbox/images/prev.png1.33KB1.59KB0.00%