89% social-gallery-block

Code Review | Social Gallery Block

WordPress plugin Social Gallery Block scored89%from 54 tests.

About plugin

  • Plugin page: social-gallery-block
  • Plugin version: 2.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Apr 1, 2020
  • Latest release: Apr 6, 2021
  • Number of updates: 7
  • Update frequency: every 52.9 days
  • Top authors: vanpariyar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,001 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.78ms] Passed 4 tests

A check of server-side resources used by Social Gallery Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.88 ▼7.14
Dashboard /wp-admin3.32 ▲0.0148.02 ▼7.99
Posts /wp-admin/edit.php3.37 ▲0.0150.45 ▼1.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.02 ▼11.79
Media Library /wp-admin/upload.php3.24 ▲0.0133.92 ▼4.20

Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/social-gallery-block/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Social Gallery Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.21 ▼1.034.96 ▲3.1544.89 ▲1.48
Dashboard /wp-admin2,224 ▲244.82 ▼0.99108.11 ▼12.9737.17 ▼9.91
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0339.35 ▼0.6235.23 ▲1.14
Add New Post /wp-admin/post-new.php6,206 ▲4,66122.04 ▼1.16878.97 ▲212.5478.04 ▲24.02
Media Library /wp-admin/upload.php1,394 ▼34.22 ▲0.0496.84 ▼11.2541.90 ▼4.29

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

social-gallery-block/plugin.php 92% from 13 tests

The main PHP script in "Social Gallery Block" version 2.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("social-gallery-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin347 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript323120249
PHP295846
Sass33138
CSS202314

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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
PNG images were not found in this plugin