84% le-bang-gallery

Code Review | Le Bang gallery

WordPress plugin Le Bang gallery scored 84% from 54 tests.

About plugin

  • Plugin page: le-bang-gallery
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.6
  • WordPress version: 6.3.1
  • First release: Jan 26, 2021
  • Latest release: Jan 26, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: lebangdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,063 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.88ms] Passed 4 tests

Server-side resources used by Le Bang gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.50 ▼2.94
Dashboard /wp-admin3.31 ▲0.0045.34 ▼0.74
Posts /wp-admin/edit.php3.36 ▲0.0044.55 ▼1.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.97 ▼10.77
Media Library /wp-admin/upload.php3.23 ▲0.0033.62 ▼0.38

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Le Bang gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲4013.23 ▼1.161.65 ▼0.2543.24 ▲0.14
Dashboard /wp-admin2,206 ▲215.83 ▼0.08103.15 ▲1.5739.81 ▼2.37
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0136.44 ▲1.5435.40 ▲2.86
Add New Post /wp-admin/post-new.php1,533 ▲1323.33 ▲0.28618.79 ▼56.9260.37 ▲4.50
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.0395.05 ▼15.5739.55 ▼7.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/le-bang-gallery/lebang-gallery.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

le-bang-gallery/lebang-gallery.php 92% from 13 tests

The main PHP script in "Le Bang gallery" version 1.0.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("le-bang-gallery.php" instead of "lebang-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin226 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript221689
SVG70081
PHP191429
CSS21127

PHP code Passed 2 tests

An overview 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.36
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
6 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/play-pause.png0.42KB0.71KB0.00%
img/error.png1.02KB1.11KB0.00%
img/next.png0.16KB0.26KB0.00%
img/video-play.png0.97KB1.25KB0.00%
img/close.png0.16KB0.19KB0.00%