67% wp-photo-album-plus

Code Review | WP Photo Album Plus

WordPress plugin WP Photo Album Plus scored67%from 54 tests.

About plugin

  • Plugin page: wp-photo-album-plus
  • Plugin version: 8.5.02.005
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.4
  • WordPress version: 6.3.1
  • First release: Feb 3, 2010
  • Latest release: Nov 8, 2023
  • Number of updates: 2,500
  • Update frequency: every 0.8 days
  • Top authors: opajaap (100%)

Code review

54 tests

User reviews

198 reviews

Install metrics

10,000+ active /3,077,000 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲9.99MB] [CPU: ▲76.69ms] 75% from 4 tests

An overview of server-side resources used by WP Photo Album Plus
Please fix the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 9.99MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /13.06 ▲9.60128.84 ▲91.78
Dashboard /wp-admin13.44 ▲10.10129.03 ▲70.73
Posts /wp-admin/edit.php13.52 ▲10.17142.27 ▲95.53
Add New Post /wp-admin/post-new.php16.02 ▲10.14169.60 ▲67.59
Media Library /wp-admin/upload.php13.35 ▲10.12112.62 ▲76.65

Server storage [IO: ▲13.51MB] [DB: ▲0.02MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/wp-photo-album-plus/" and "wp-content/uploads/"
    • (new file) wp-content/wppa-depot/.empty
Filesystem: 316 new files
Database: 9 new tables, 39 new options
New tables
wp_wppa_session
wp_wppa_index
wp_wppa_rating
wp_wppa_albums
wp_wppa_caches
wp_wppa_photos
wp_wppa_exif
wp_wppa_comments
wp_wppa_iptc
New WordPress options
wppa_failed_mails
wppa_album_crypt_3
can_compress_scripts
widget_wppa_upldr_widget
widget_recent-posts
theysaidso_admin_options
widget_wppa_gp_widget
widget_theysaidso_widget
widget_wppa_multitag_photos
widget_wppa_search_photos
...

Browser metrics Passed 4 tests

WP Photo Album Plus: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,414 ▲66717.28 ▲2.6618.04 ▲16.3742.74 ▲3.93
Dashboard /wp-admin2,453 ▲2787.14 ▲1.47130.60 ▲24.2397.91 ▲54.28
Posts /wp-admin/edit.php2,326 ▲2233.85 ▲1.9059.71 ▲20.6349.59 ▲14.59
Add New Post /wp-admin/post-new.php1,708 ▲17921.28 ▼1.72705.41 ▲42.2643.74 ▼9.43
Media Library /wp-admin/upload.php1,621 ▲2215.44 ▲1.19118.10 ▲21.3983.75 ▲39.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 9 tables in the database
    • wp_wppa_caches
    • wp_wppa_photos
    • wp_wppa_comments
    • wp_wppa_session
    • wp_wppa_exif
    • wp_wppa_albums
    • wp_wppa_iptc
    • wp_wppa_index
    • wp_wppa_rating
  • Zombie WordPress options detected upon uninstall: 39 options
    • widget_your_ip
    • widget_wppa_featen_widget
    • wppa_catlist
    • widget_wppa_topten_widget
    • widget_wppa_tagcloud_photos
    • widget_slideshow_widget
    • wppa_child_list
    • widget_wppa_thumbnail_widget
    • widget_wppa_notify_widget
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 55× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/wp-photo-album-plus/wppa-comment-widget.php
    • > /wp-content/plugins/wp-photo-album-plus/wppa-import-ajax.php
    • > /wp-content/plugins/wp-photo-album-plus/wppa-upload.php
    • > /wp-content/plugins/wp-photo-album-plus/theme/photo-album-page-2016.php
    • > /wp-content/plugins/wp-photo-album-plus/wppa-maintenance.php
    • > /wp-content/plugins/wp-photo-album-plus/wppa-ajax.php
    • > /wp-content/plugins/wp-photo-album-plus/wppa-styles.php
    • > /wp-content/plugins/wp-photo-album-plus/wppa-album-admin-autosave.php
    • > /wp-content/plugins/wp-photo-album-plus/wppa-items.php
    • > /wp-content/plugins/wp-photo-album-plus/wppa-video.php
  • 32× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-photo-album-plus/wppa-gutenberg-wppa.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-photo-album-plus/wppa-mailing.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-photo-album-plus/wppa-qr-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-photo-album-plus/wppa-thumbnail-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-photo-album-plus/wppa-album-navigator-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-photo-album-plus/wppa-dashboard-widgets.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-photo-album-plus/wppa-super-view-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-photo-album-plus/wppa-privacy-policy.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-photo-album-plus/wppa-input.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-photo-album-plus/wppa-upload-widget.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-photo-album-plus/wppa.php 92% from 13 tests

The principal PHP file in "WP Photo Album Plus" v. 8.5.02.005 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-photo-album-plus.php" instead of "wppa.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin246,305 lines of code in 202 files:
LanguageFilesBlank linesComment linesLines of code
PO File1354,03060,932127,123
PHP11613,40623,27866,055
JavaScript4511,1564,64951,285
CSS5182951,490
SVG1743191
Markdown1960106
JSON50055

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.90
▷ Minimum class complexity1.00
▷ Maximum class complexity148.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods242
▷ Static methods3614.88%
▷ Public methods21187.19%
▷ Protected methods2911.98%
▷ Private methods20.83%
Functions1,110
▷ Named functions1,10299.28%
▷ Anonymous functions80.72%
Constants64
▷ Global constants6093.75%
▷ Class constants46.25%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
64 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/medal_gold_2.png1.46KB1.45KB0.27%
img/Pause-Button.png0.33KB0.25KB▼ 23.44%
img/documentstub.png18.88KB8.49KB▼ 55.03%
img/Exit.png0.42KB0.50KB0.00%
img/thumbdown.png1.43KB1.46KB0.00%