83% bvd-easy-gallery-manager

Code Review | BVD Easy Gallery Manager

WordPress plugin BVD Easy Gallery Manager scored83%from 54 tests.

About plugin

  • Plugin page: bvd-easy-gallery-...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Aug 31, 2015
  • Latest release: Nov 4, 2015
  • Number of updates: 8
  • Update frequency: every 8.4 days
  • Top authors: bvads (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,221 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▲1.44ms] Passed 4 tests

An overview of server-side resources used by BVD Easy Gallery Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2446.09 ▲3.57
Dashboard /wp-admin3.56 ▲0.2652.45 ▲0.80
Posts /wp-admin/edit.php3.62 ▲0.2655.72 ▲8.82
Add New Post /wp-admin/post-new.php6.08 ▲0.2095.33 ▼3.15
Media Library /wp-admin/upload.php3.40 ▲0.1838.41 ▲4.55
Plugin Details /wp-admin/edit.php?post_type=bvd-gallery&page=bvd-gallery-manager-details3.4239.08
BVD Gallery /wp-admin/edit.php?post_type=bvd-gallery3.4844.50

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
bvads_plugin_tracking_uuid
bvads_plugin_tracking_used_free_trial
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for BVD Easy Gallery Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,329 ▲57216.44 ▲2.0620.91 ▲18.9237.64 ▼11.23
Dashboard /wp-admin2,368 ▲1806.36 ▲0.54126.79 ▲12.6239.85 ▼5.33
Posts /wp-admin/edit.php2,283 ▲1943.37 ▲1.3354.07 ▲15.6234.79 ▼1.68
Add New Post /wp-admin/post-new.php1,551 ▲3118.31 ▼4.87560.87 ▼105.3031.98 ▼20.67
Media Library /wp-admin/upload.php1,410 ▲224.17 ▼0.0277.06 ▼19.2740.33 ▼1.39
Plugin Details /wp-admin/edit.php?post_type=bvd-gallery&page=bvd-gallery-manager-details1,0933.0443.2361.38
BVD Gallery /wp-admin/edit.php?post_type=bvd-gallery1,2583.3246.2727.01

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • bvads_plugin_tracking_uuid
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • bvads_plugin_tracking_used_free_trial

Smoke tests 75% from 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)
Good news, no errors were detected

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
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_custom() in wp-content/plugins/bvd-easy-gallery-manager/bvd-gallery-manager-gallery-options-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/bvd-easy-gallery-manager/bvd-gallery-manager-frontend-gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bvd-easy-gallery-manager/bvd-gallery-manager.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bvd-easy-gallery-manager/bvd-gallery-manager-plugin-details-page.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Plugin instructions and details), #2 (All galleries), #3 (Individual gallery page), #4 (Additional gallery settings), #5 (Live gallery in page), #6 (Upload images from mobile device - Pro feature)
You can look at the official readme.txt

bvd-easy-gallery-manager/bvd-gallery-manager.php 92% from 13 tests

The main PHP file in "BVD Easy Gallery Manager" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bvd-easy-gallery-manager.php" instead of "bvd-gallery-manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin5,019 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61522591,802
PHP4241751,444
CSS596481,133
SVG100640

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity96.00
▷ Minimum class complexity96.00
▷ Maximum class complexity96.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods33
▷ Static methods13.03%
▷ Public methods3296.97%
▷ Protected methods00.00%
▷ Private methods13.03%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 1.42MB with 0.86MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png64.71KB26.97KB▼ 58.32%
screenshot-6.png24.21KB9.31KB▼ 61.53%
screenshot-5.png816.56KB284.09KB▼ 65.21%
screenshot-1.png159.58KB71.06KB▼ 55.47%
screenshot-3.png231.97KB85.44KB▼ 63.17%