83% responsive-photo-gallery-wp

Code Review | Photo Gallery WordPress

WordPress plugin Photo Gallery WordPress scored83%from 54 tests.

About plugin

  • Plugin page: responsive-photo-...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.7
  • WordPress version: 6.3.1
  • First release: Feb 11, 2015
  • Latest release: Mar 27, 2021
  • Number of updates: 33
  • Update frequency: every 67.8 days
  • Top authors: themepoints (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /12,546 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼10.01ms] Passed 4 tests

Server-side resources used by Photo Gallery WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2143.87 ▲4.58
Dashboard /wp-admin3.51 ▲0.1652.08 ▼13.50
Posts /wp-admin/edit.php3.62 ▲0.2648.45 ▼3.56
Add New Post /wp-admin/post-new.php6.11 ▲0.2286.64 ▼21.57
Media Library /wp-admin/upload.php3.43 ▲0.1936.93 ▼1.39
Generate Shortcode /wp-admin/post-new.php?post_type=generategallery3.4758.35
All Shortcodes /wp-admin/edit.php?post_type=generategallery3.4738.92
All Images /wp-admin/edit.php?post_type=tp_photo_gallery3.4339.24
Categories /wp-admin/edit-tags.php?taxonomy=tpgallerycat&post_type=tp_photo_gallery3.4236.61
Add New Image /wp-admin/post-new.php?post_type=tp_photo_gallery3.5653.84

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

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

Browser metrics Passed 4 tests

Photo Gallery WordPress: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲23913.82 ▼0.809.97 ▲8.3443.56 ▼2.10
Dashboard /wp-admin2,264 ▲845.90 ▲0.2293.31 ▲5.2842.86 ▼0.62
Posts /wp-admin/edit.php2,150 ▲472.35 ▲0.3736.13 ▼5.8334.59 ▼8.74
Add New Post /wp-admin/post-new.php1,587 ▲5623.33 ▲0.66648.32 ▼42.0935.68 ▼22.03
Media Library /wp-admin/upload.php1,470 ▲704.48 ▲0.3297.44 ▼15.6145.13 ▼1.90
Generate Shortcode /wp-admin/post-new.php?post_type=generategallery2,4232.9060.4540.99
All Shortcodes /wp-admin/edit.php?post_type=generategallery1,1432.4633.6029.33
All Images /wp-admin/edit.php?post_type=tp_photo_gallery1,1412.4536.7031.76
Categories /wp-admin/edit-tags.php?taxonomy=tpgallerycat&post_type=tp_photo_gallery1,3482.1728.1527.06
Add New Image /wp-admin/post-new.php?post_type=tp_photo_gallery2,4408.14199.9978.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=tp_photo_gallery
    • > Notice in wp-content/plugins/responsive-photo-gallery-wp/libs/post-types/tps_photo_gallery_posttypes.php+68
    Undefined index: order

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

responsive-photo-gallery-wp/custom-photo-gallery-wordpress.php 85% from 13 tests

This is the main PHP file of "Photo Gallery WordPress" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 163 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("responsive-photo-gallery-wp.php" instead of "custom-photo-gallery-wordpress.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
Success! There were no dangerous files found in this plugin5,169 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript74172312,377
CSS4125281,294
PHP412164933
SVG100565

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/css/gallery.png3.87KB0.87KB▼ 77.55%