84% vk-photo-albums

Code Review | vk photo album

WordPress plugin vk photo album scored84%from 54 tests.

About plugin

  • Plugin page: vk-photo-albums
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.4
  • WordPress version: 6.3.1
  • First release: Sep 20, 2015
  • Latest release: Sep 20, 2015
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: Temirkhan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,041 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
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.42ms] Passed 4 tests

An overview of server-side resources used by vk photo album
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1047.38 ▲6.14
Dashboard /wp-admin3.39 ▲0.0953.26 ▲1.98
Posts /wp-admin/edit.php3.51 ▲0.1551.09 ▼1.03
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.29 ▼17.20
Media Library /wp-admin/upload.php3.32 ▲0.0936.10 ▼5.43
Photoalbums /wp-admin/edit-tags.php?taxonomy=photo_albums&post_type=wp-photo3.3137.09
Add photo /wp-admin/post-new.php?post_type=wp-photo3.4253.30
Photos list /wp-admin/edit.php?post_type=wp-photo3.3638.69

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for vk photo album
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.29 ▼0.691.68 ▲0.0544.65 ▼1.39
Dashboard /wp-admin2,234 ▲434.82 ▼0.08106.84 ▼19.8042.82 ▼4.09
Posts /wp-admin/edit.php2,120 ▲282.04 ▲0.0234.22 ▼6.8134.56 ▼1.82
Add New Post /wp-admin/post-new.php1,540 ▲417.34 ▼5.94693.47 ▲70.6854.66 ▼0.84
Media Library /wp-admin/upload.php1,416 ▲284.20 ▲0.00101.18 ▼3.3744.80 ▲1.43
Photoalbums /wp-admin/edit-tags.php?taxonomy=photo_albums&post_type=wp-photo1,2902.1428.2830.84
Add photo /wp-admin/post-new.php?post_type=wp-photo2,2414.0083.7238.90
Photos list /wp-admin/edit.php?post_type=wp-photo1,1591.9331.5935.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
The following issues need your attention
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-photo-albums/WordpressPhotoAlbum.php:426
    • > PHP Fatal error
      Uncaught Error: Class 'WordpressPhotoAlbum' not found in wp-content/plugins/vk-photo-albums/templates/album.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WordpressPhotoAlbum' not found in wp-content/plugins/vk-photo-albums/templates/api/album-photos.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WordpressPhotoAlbum' not found in wp-content/plugins/vk-photo-albums/templates/api/single-photo.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WordpressPhotoAlbum' not found in wp-content/plugins/vk-photo-albums/templates/photo.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WordpressPhotoAlbum' not found in wp-content/plugins/vk-photo-albums/templates/main.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: vk, gallery, album, images, photos

vk-photo-albums/wordpress-photo-album.php 92% from 13 tests

The main PHP script in "vk photo album" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("vk-photo-albums.php" instead of "wordpress-photo-album.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected935 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9156105607
JavaScript16618174
CSS1503154

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods19100.00%
▷ Public methods1263.16%
▷ Protected methods00.00%
▷ Private methods736.84%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/image-folder.png25.41KB9.51KB▼ 62.57%