67% new-album-gallery

Code Review | Album Gallery - WordPress Gallery

WordPress plugin Album Gallery - WordPress Gallery scored67%from 54 tests.

About plugin

  • Plugin page: new-album-gallery
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 24, 2017
  • Latest release: Oct 20, 2023
  • Number of updates: 126
  • Update frequency: every 19.5 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

5,000+ active /104,303 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.50MB] [CPU: ▼6.87ms] Passed 4 tests

Analyzing server-side resources used by Album Gallery - WordPress Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5340.69 ▲1.93
Dashboard /wp-admin3.85 ▲0.5048.98 ▼14.57
Posts /wp-admin/edit.php3.90 ▲0.5448.72 ▼3.80
Add New Post /wp-admin/post-new.php6.37 ▲0.4884.98 ▼11.04
Media Library /wp-admin/upload.php3.71 ▲0.4838.54 ▲4.29
Our Theme /wp-admin/edit.php?post_type=album_gallery&page=sr-theme-page3.6835.79
Add Album Gallery /wp-admin/post-new.php?post_type=album_gallery3.9049.09
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.7836.45
Column Settings /wp-admin/edit.php?post_type=album_gallery&page=ag-column-page3.7437.30
Docs /wp-admin/edit.php?post_type=album_gallery&page=ag-doc-page3.6835.85
All Album Gallery /wp-admin/edit.php?post_type=album_gallery3.7142.18

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 84 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Album Gallery - WordPress Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲20213.46 ▼1.138.07 ▲6.3738.59 ▼0.30
Dashboard /wp-admin2,269 ▲985.51 ▼0.0683.73 ▼1.0043.46 ▲0.56
Posts /wp-admin/edit.php2,186 ▲862.03 ▲0.0134.46 ▼2.3340.13 ▲2.58
Add New Post /wp-admin/post-new.php1,606 ▲8023.20 ▼0.40679.17 ▼5.2249.98 ▲1.46
Media Library /wp-admin/upload.php1,485 ▲824.26 ▲0.0996.02 ▼6.6246.19 ▲0.90
Our Theme /wp-admin/edit.php?post_type=album_gallery&page=sr-theme-page1,0282.0626.83102.40
Add Album Gallery /wp-admin/post-new.php?post_type=album_gallery2,2643.8679.10312.69
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0872.0328.1431.80
Column Settings /wp-admin/edit.php?post_type=album_gallery&page=ag-column-page1,0822.2529.1345.46
Docs /wp-admin/edit.php?post_type=album_gallery&page=ag-doc-page9432.0223.8235.10
All Album Gallery /wp-admin/edit.php?post_type=album_gallery1,1642.0142.5844.15

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=album_gallery
    • > Notice in wp-content/plugins/new-album-gallery/new-album-gallery.php+104
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=album_gallery
    • > Notice in wp-content/plugins/new-album-gallery/new-album-gallery.php+104
    Trying to access array offset on value of type null

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/new-album-gallery/include/docs.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/new-album-gallery/class-tgm-plugin-activation.php:2129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/new-album-gallery/our-theme/awp-theme.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=album_gallery&page=sr-theme-page
    • > Network (severe)
    wp-content/plugins/new-album-gallery/js/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: album gallery, album, gallery, video gallery, carousel...

new-album-gallery/new-album-gallery.php Passed 13 tests

The main PHP file in "Album Gallery - WordPress Gallery" ver. 1.5.4 adds more information about the plugin and also serves as the entry point for this plugin
97 characters long description:
A Newly Amazing Different Most Powerful Responsive Easy To Use Album Gallery Plugin For WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected41,413 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
CSS182,43012724,733
JavaScript81,8361,5237,316
SVG8005,924
PHP86211,6953,233
PO File18697207

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity43.50
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods119
▷ Static methods54.20%
▷ Public methods9478.99%
▷ Protected methods2521.01%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants666.67%
▷ Class constants333.33%
▷ Public constants3100.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
5 PNG files occupy 0.17MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/bg.png0.26KB0.26KB0.00%
assets/img/p-youtube.png0.66KB0.67KB0.00%
assets/css/new-slide.png7.21KB2.40KB▼ 66.75%
assets/img/icons.png0.71KB0.43KB▼ 39.64%
our-theme/img/aneeq-premium.png165.42KB57.84KB▼ 65.04%