78% simple-photo-album

Code Review | Simple Photo Album - by Simple Plugins

WordPress plugin Simple Photo Album - by Simple Plugins scored 78% from 54 tests.

About plugin

  • Plugin page: simple-photo-album
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 23, 2022
  • Latest release: Sep 21, 2023
  • Number of updates: 6
  • Update frequency: every 65.7 days
  • Top authors: simplewpplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 257 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼6.67ms] Passed 4 tests

Analyzing server-side resources used by Simple Photo Album - by Simple Plugins
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2239.72 ▼16.64
Dashboard /wp-admin3.49 ▲0.1946.97 ▼0.24
Posts /wp-admin/edit.php3.60 ▲0.2548.15 ▼4.27
Add New Post /wp-admin/post-new.php6.08 ▲0.1996.32 ▼5.51
Media Library /wp-admin/upload.php3.41 ▲0.1937.28 ▲5.61
Add Album /wp-admin/post-new.php?post_type=simpa_album3.4749.90
All Albums /wp-admin/edit.php?post_type=simpa_album3.4940.65

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 19 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
photo_columns_mobile
photo_width
widget_recent-comments
db_upgraded
simpa_version
album_columns_tablet
album_columns_mobile
photo_columns_desktop
...

Browser metrics Passed 4 tests

Checking browser requirements for Simple Photo Album - by Simple Plugins
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.21 ▼1.371.53 ▼1.3237.62 ▼22.93
Dashboard /wp-admin2,233 ▲454.82 ▼0.99104.87 ▲1.5236.87 ▼10.53
Posts /wp-admin/edit.php2,116 ▲272.06 ▲0.0639.01 ▼2.0034.96 ▼1.18
Add New Post /wp-admin/post-new.php1,557 ▲16420.87 ▲2.20628.88 ▲22.2554.18 ▼7.55
Media Library /wp-admin/upload.php1,418 ▲364.17 ▼0.0395.81 ▼1.7441.16 ▼0.75
Add Album /wp-admin/post-new.php?post_type=simpa_album1,6673.5361.9132.13
All Albums /wp-admin/edit.php?post_type=simpa_album1,2683.3349.6228.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 19 options in the database
    • photo_columns_desktop
    • simpa_version
    • cover_height
    • db_upgraded
    • album_columns_gap
    • photo_width
    • album_columns_tablet
    • photo_columns_mobile
    • album_columns_desktop
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-photo-album/templates/albums.php
    • > /wp-content/plugins/simple-photo-album/templates/album.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-photo-album/templates/empty-album.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-photo-album/templates/admin/metabox/gallery.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/simple-photo-album/templates/admin/metabox/album-cover.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-photo-album/templates/invalid-album.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-photo-album/templates/no-album.php:1
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/simple-photo-album/templates/albums.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/simple-photo-album/simple-photo-album.php:22
    • > PHP Notice
      Undefined variable: photos in wp-content/plugins/simple-photo-album/templates/album.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/simple-photo-album/templates/albums.php on line 3
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/simple-photo-album/templates/album.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Invalid version format
The official readme.txt might help

simple-photo-album/simple-photo-album.php Passed 13 tests

"Simple Photo Album - by Simple Plugins" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
93 characters long description:
Creates a simple photo album system with minimal settings as the name suggests, it\'s simple.

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
No dangerous file extensions were detected5,575 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,2066443,887
CSS616720907
PHP16532162781

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.29
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 are no PNG files in this plugin