84% luzuk-photo-gallery

Code Review | Luzuk Photo Gallery

WordPress plugin Luzuk Photo Gallery scored84%from 54 tests.

About plugin

  • Plugin page: luzuk-photo-gallery
  • Plugin version: 0.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: Oct 7, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: luzuk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /321 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.20ms] Passed 4 tests

An overview of server-side resources used by Luzuk Photo Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.49 ▼2.75
Dashboard /wp-admin3.33 ▲0.0345.38 ▼2.06
Posts /wp-admin/edit.php3.38 ▲0.0246.44 ▼1.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.28 ▲4.10
Media Library /wp-admin/upload.php3.25 ▲0.0233.43 ▼2.90
Add New /wp-admin/post-new.php?post_type=our-lgallery3.3347.32
Luzuk Photo Gallery /wp-admin/edit.php?post_type=our-lgallery3.3033.11

Server storage [IO: ▲0.36MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Luzuk Photo Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,014 ▲25714.29 ▼0.3817.38 ▲15.5341.77 ▲1.45
Dashboard /wp-admin2,233 ▲455.89 ▲0.86108.05 ▼7.9941.23 ▼0.01
Posts /wp-admin/edit.php2,116 ▲242.04 ▲0.0438.17 ▼0.9633.86 ▼6.10
Add New Post /wp-admin/post-new.php1,575 ▲4718.03 ▼0.26597.94 ▼15.7671.22 ▲20.37
Media Library /wp-admin/upload.php1,418 ▲304.26 ▲0.0394.74 ▼1.9342.16 ▲1.80
Add New /wp-admin/post-new.php?post_type=our-lgallery1,7153.5664.4632.36
Luzuk Photo Gallery /wp-admin/edit.php?post_type=our-lgallery1,0942.0029.9430.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/luzuk-photo-gallery/luzuk-photo-gallery.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (21 tag instead of maximum 10)
Please take inspiration from this readme.txt

luzuk-photo-gallery/luzuk-photo-gallery.php Passed 13 tests

The principal PHP file in "Luzuk Photo Gallery" v. 0.0.1 is loaded by WordPress automatically on each request
117 characters long description:
Luzuk Photo Gallery is a plugin to create your own Image Gallery section. You can add this shortcode [luzuk_gallery].

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin677 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript49658528
PHP15326138
CSS32811

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/default.png5.19KB5.66KB0.00%