84% simple-gallery-lightbox

Code Review | Simple Gallery Lightbox

WordPress plugin Simple Gallery Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: simple-gallery-li...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Mar 18, 2020
  • Latest release: Mar 18, 2020
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: gamevase (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /435 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Simple Gallery Lightbox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.56 ▲2.09
Dashboard /wp-admin3.31 ▲0.0156.29 ▲1.20
Posts /wp-admin/edit.php3.36 ▲0.0050.98 ▲0.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.93 ▼14.52
Media Library /wp-admin/upload.php3.24 ▲0.0040.40 ▲0.92

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Gallery Lightbox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲13613.49 ▼0.798.75 ▲6.5536.87 ▼8.53
Dashboard /wp-admin2,189 ▲125.65 ▲0.0591.27 ▼0.2837.26 ▼5.61
Posts /wp-admin/edit.php2,100 ▲32.00 ▼0.0140.02 ▲2.3336.51 ▲1.55
Add New Post /wp-admin/post-new.php1,526 ▼123.08 ▼0.05680.31 ▼22.1456.80 ▼4.77
Media Library /wp-admin/upload.php1,397 ▼34.18 ▲0.01107.23 ▼10.3749.92 ▲0.56

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-gallery-lightbox/simple-gallery-lightbox.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: gutenberg, lightbox, gallery

simple-gallery-lightbox/simple-gallery-lightbox.php Passed 13 tests

"Simple Gallery Lightbox" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
Adds a simple lightbox to default Gutenberg gallery

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected69 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript135044
CSS12019
PHP14106

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin