90% bne-gallery-extended

Code Review | BNE Gallery Extended

WordPress plugin BNE Gallery Extended scored90%from 54 tests.

About plugin

  • Plugin page: bne-gallery-extended
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Mar 29, 2016
  • Latest release: Jun 4, 2022
  • Number of updates: 21
  • Update frequency: every 107.5 days
  • Top authors: Bluenotes (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /19,900 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.05MB] [CPU: ▼5.72ms] Passed 4 tests

This is a short check of server-side resources used by BNE Gallery Extended
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.74 ▼6.32
Dashboard /wp-admin3.36 ▲0.0548.46 ▼2.72
Posts /wp-admin/edit.php3.41 ▲0.0548.93 ▲2.77
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.88 ▼16.62
Media Library /wp-admin/upload.php3.28 ▲0.0538.87 ▲3.03

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

BNE Gallery Extended: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.30 ▲0.081.59 ▼0.2541.11 ▲0.77
Dashboard /wp-admin2,198 ▲215.65 ▼0.0292.50 ▲3.0940.75 ▼3.15
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0234.99 ▼4.5236.25 ▲1.30
Add New Post /wp-admin/post-new.php1,635 ▲9022.41 ▼0.69663.38 ▲19.3951.21 ▼3.07
Media Library /wp-admin/upload.php1,441 ▲414.21 ▼0.0396.38 ▼4.6645.39 ▲1.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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: carousel gallery, masonry gallery, gallery, wordpress gallery

bne-gallery-extended/bne-gallery-extended.php 92% from 13 tests

"BNE Gallery Extended" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "4.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin364 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2101155363
JavaScript10401

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity11.50
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin