84% simple-block-gallery

Code Review | Simple Block Gallery

WordPress plugin Simple Block Gallery scored84%from 54 tests.

About plugin

  • Plugin page: simple-block-gallery
  • Plugin version: 1.05
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Jan 22, 2020
  • Latest release: Nov 1, 2023
  • Number of updates: 22
  • Update frequency: every 62.6 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /3,294 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
Installer ran successfully

Server metrics [RAM: ▼0.25MB] [CPU: ▼12.49ms] Passed 4 tests

An overview of server-side resources used by Simple Block Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.17 ▲0.40
Dashboard /wp-admin3.33 ▼0.0149.04 ▼5.79
Posts /wp-admin/edit.php3.39 ▲0.0344.89 ▲0.86
Add New Post /wp-admin/post-new.php4.85 ▼1.0452.32 ▼43.92
Media Library /wp-admin/upload.php3.26 ▲0.0234.10 ▼0.65

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Block Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.35 ▲0.061.84 ▲0.1343.59 ▲2.89
Dashboard /wp-admin2,198 ▲175.62 ▼0.0998.80 ▼1.9042.72 ▼0.33
Posts /wp-admin/edit.php2,097 ▼31.95 ▼0.0534.42 ▼4.1934.54 ▲2.24
Add New Post /wp-admin/post-new.php6,198 ▲4,67018.92 ▼4.13908.85 ▲216.0860.93 ▲9.72
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0395.97 ▼13.3339.93 ▼9.38

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-block-gallery/lib/class-simpleblockgallery.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-block-gallery/lib/class-simpleblockgallery.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
5 plugin tags: gallery, block, masonry, images, slider

simple-block-gallery/simpleblockgallery.php 92% from 13 tests

The principal PHP file in "Simple Block Gallery" v. 1.05 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-block-gallery.php" instead of "simpleblockgallery.php")

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 detected388 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4260264
PHP42169107
JSON10017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin