90% kt-photogallery

Code Review | Photogallery

WordPress plugin Photogallery scored90%from 54 tests.

About plugin

  • Plugin page: kt-photogallery
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Nov 5, 2014
  • Latest release: Aug 20, 2017
  • Number of updates: 70
  • Update frequency: every 14.6 days
  • Top authors: kungtiger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,313 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.25MB] [CPU: ▼2.82ms] Passed 4 tests

A check of server-side resources used by Photogallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2639.82 ▼3.56
Dashboard /wp-admin3.55 ▲0.2552.92 ▲0.26
Posts /wp-admin/edit.php3.67 ▲0.3255.70 ▲3.93
Add New Post /wp-admin/post-new.php6.13 ▲0.2486.60 ▼11.39
Media Library /wp-admin/upload.php3.47 ▲0.2441.66 ▲3.40
New Album /wp-admin/post-new.php?post_type=photoalbum3.6253.25
New Gallery /wp-admin/post-new.php?post_type=photogallery3.5851.87
All Galleries /wp-admin/edit.php?post_type=photogallery3.5337.89
All Albums /wp-admin/edit.php?post_type=photoalbum3.5339.04

Server storage [IO: ▲0.10MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Photogallery: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.28 ▼0.071.65 ▼0.0147.13 ▲2.27
Dashboard /wp-admin2,236 ▲595.62 ▼0.0293.22 ▼6.4742.72 ▼0.37
Posts /wp-admin/edit.php2,141 ▲381.98 ▼0.0039.23 ▼0.1938.08 ▲3.08
Add New Post /wp-admin/post-new.php1,558 ▲3223.20 ▲0.08663.46 ▲14.6059.46 ▲3.53
Media Library /wp-admin/upload.php1,435 ▲324.25 ▲0.07104.50 ▲5.8645.94 ▲1.47
New Album /wp-admin/post-new.php?post_type=photoalbum2,7087.73177.5483.08
New Gallery /wp-admin/post-new.php?post_type=photogallery2,5276.75154.7668.33
All Galleries /wp-admin/edit.php?post_type=photogallery1,2731.9830.6936.26
All Albums /wp-admin/edit.php?post_type=photoalbum1,2551.9430.2832.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Everything seems fine, however this is by no means an exhaustive test

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: custom post types, image, photo, gallery, picture...

kt-photogallery/kt-photogallery.php Passed 13 tests

The entry point to "Photogallery" version 1.4 is a PHP file that has certain tags in its header comment area
33 characters long description:
Create photo-galleries with ease.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,714 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP15376855
JavaScript21726583
CSS1339276

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity126.00
▷ Minimum class complexity126.00
▷ Maximum class complexity126.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods41
▷ Static methods12.44%
▷ Public methods3380.49%
▷ Protected methods819.51%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin