79% blocksolid-snippets

Code Review | Blocksolid Snippets

WordPress plugin Blocksolid Snippets scored79%from 54 tests.

About plugin

  • Plugin page: blocksolid-snippets
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Jun 4, 2021
  • Latest release: Oct 24, 2023
  • Number of updates: 22
  • Update frequency: every 39.6 days
  • Top authors: peripatus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,165 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▲0.71ms] Passed 4 tests

Server-side resources used by Blocksolid Snippets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0738.50 ▲0.55
Dashboard /wp-admin3.38 ▲0.0745.11 ▼6.09
Posts /wp-admin/edit.php3.43 ▲0.0747.31 ▲4.11
Add New Post /wp-admin/post-new.php6.04 ▲0.1591.98 ▲4.55
Media Library /wp-admin/upload.php3.30 ▲0.0736.89 ▲4.27
Snippets /wp-admin/edit.php?post_type=snippet3.3534.52
Add New /wp-admin/post-new.php?post_type=snippet6.0979.91

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Blocksolid Snippets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8314.40 ▼0.021.65 ▲0.1339.94 ▲1.72
Dashboard /wp-admin2,244 ▲645.66 ▲0.00123.57 ▲37.9241.90 ▲1.03
Posts /wp-admin/edit.php2,152 ▲522.04 ▲0.0340.10 ▲3.4535.07 ▲0.70
Add New Post /wp-admin/post-new.php6,390 ▲4,86428.08 ▲4.53825.36 ▲145.0253.69 ▼12.31
Media Library /wp-admin/upload.php1,453 ▲564.24 ▲0.0394.99 ▼5.4041.34 ▼2.99
Snippets /wp-admin/edit.php?post_type=snippet1,1331.9831.8030.43
Add New /wp-admin/post-new.php?post_type=snippet6,22922.67877.6032.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blocksolid-snippets/blocksolid-snippets.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=snippet
    • > Console-api (warning) in unknown
    /wp-includes/js/dist/block-editor.min.js?ver=0cd49e3f951fc97cabb7 25:219944 "blocksolid-snippets-admin-styles-css was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe." link#blocksolid-snippets-admin-styles-css

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: snippets, repeated, custom post type, reusable, gutenberg...

blocksolid-snippets/blocksolid-snippets.php Passed 13 tests

Analyzing the main PHP file in "Blocksolid Snippets" version 1.0.9
120 characters long description:
Snippets of code are contained in a custom post type that can then be called via a Gutenberg block or a simple shortcode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected364 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP25524154
JavaScript11646151
CSS111053
SVG1006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.76
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%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
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
No PNG images were found in this plugin