84% bilych-gallery

Code Review | Bilych Gallery

WordPress plugin Bilych Gallery scored84%from 54 tests.

About plugin

  • Plugin page: bilych-gallery
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2015
  • Latest release: Feb 20, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Birus (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,354 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.01ms] Passed 4 tests

Analyzing server-side resources used by Bilych Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.50 ▲4.53
Dashboard /wp-admin3.37 ▲0.0344.03 ▼13.81
Posts /wp-admin/edit.php3.49 ▲0.1347.42 ▼1.32
Add New Post /wp-admin/post-new.php5.95 ▲0.0779.59 ▼14.75
Media Library /wp-admin/upload.php3.29 ▲0.0733.48 ▲1.86
Bilych Gallery /wp-admin/options-general.php?page=bilych-gallery-settings3.2637.22

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
bilych_gallery_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Bilych Gallery: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲22313.98 ▼0.6815.32 ▲13.7035.89 ▼7.62
Dashboard /wp-admin2,212 ▲605.84 ▲0.24106.89 ▲9.2736.83 ▼6.17
Posts /wp-admin/edit.php2,098 ▲122.02 ▼0.0440.42 ▲2.5335.10 ▲1.92
Add New Post /wp-admin/post-new.php1,533 ▲223.06 ▼0.03640.01 ▲24.8259.86 ▼1.74
Media Library /wp-admin/upload.php1,394 ▲64.20 ▼0.0296.32 ▼0.3641.37 ▼3.07
Bilych Gallery /wp-admin/options-general.php?page=bilych-gallery-settings8182.0725.3928.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bilych-gallery/admin/partials/bilych-gallery-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === bilych-gallery === )
You can look at the official readme.txt

bilych-gallery/bilych-gallery.php Passed 13 tests

This is the main PHP file of "Bilych Gallery" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
This plugin replace default Wordpress 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
Good job! No executable or dangerous file extensions detected11,073 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34,4882,8729,263
CSS4269761,552
PHP11151524258

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.29
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
32 PNG files occupy 0.27MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/default/slider_arrow_left.png0.46KB0.18KB▼ 60.21%
public/images/default/button_fullscreen.png1.03KB0.95KB▼ 7.81%
public/images/default/slider_bullets.png0.44KB0.35KB▼ 20.80%
admin/partials/img/photopile.png77.10KB26.93KB▼ 65.07%
public/images/button_fullscreen.png1.49KB1.09KB▼ 27.14%