84% gallery-thumbnails-block

Code Review | Gallery Thumbnails Block

WordPress plugin Gallery Thumbnails Block scored84%from 54 tests.

About plugin

  • Plugin page: gallery-thumbnail...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2022
  • Latest release: Nov 14, 2022
  • Number of updates: 6
  • Update frequency: every 2.2 days
  • Top authors: mahdiyazdani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /812 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.51ms] Passed 4 tests

An overview of server-side resources used by Gallery Thumbnails Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0466.17 ▲19.95
Dashboard /wp-admin3.33 ▲0.0252.01 ▼5.09
Posts /wp-admin/edit.php3.38 ▲0.0252.30 ▼0.29
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.14 ▼17.94
Media Library /wp-admin/upload.php3.25 ▲0.0239.87 ▲5.29

Server storage [IO: ▲0.21MB] [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: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Gallery Thumbnails Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.21 ▼0.332.52 ▲0.5552.64 ▲4.51
Dashboard /wp-admin2,192 ▲155.56 ▼0.1089.01 ▼4.6941.95 ▲2.99
Posts /wp-admin/edit.php2,100 ▼01.93 ▼0.0334.36 ▼1.3338.59 ▲5.66
Add New Post /wp-admin/post-new.php6,364 ▲4,83828.00 ▲4.87928.64 ▲248.6057.98 ▲6.35
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0198.81 ▼11.5144.30 ▼3.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 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)
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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Gallery_Thumbnails_Block\\plugin_basename() in wp-content/plugins/gallery-thumbnails-block/gallery-thumbnails-block.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: slider, photo gallery, image gallery, gallery

gallery-thumbnails-block/gallery-thumbnails-block.php Passed 13 tests

The principal PHP file in "Gallery Thumbnails Block" v. 1.0.0 is loaded by WordPress automatically on each request
50 characters long description:
A simple gallery block with thumbnails navigation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin71 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JSON10035
PHP475632
CSS2002
JavaScript2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
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
Namespaces1
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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