90% elfsight-blocks

Code Review | Elfsight Blocks

WordPress plugin Elfsight Blocks scored90%from 54 tests.

About plugin

  • Plugin page: elfsight-blocks
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Jul 27, 2023
  • Number of updates: 8
  • Update frequency: every 165.7 days
  • Top authors: elfsight (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /9,057 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by Elfsight Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.79 ▲4.18
Dashboard /wp-admin3.32 ▲0.0151.97 ▲1.86
Posts /wp-admin/edit.php3.37 ▲0.0150.40 ▼4.78
Add New Post /wp-admin/post-new.php4.84 ▼1.0653.73 ▼58.31
Media Library /wp-admin/upload.php3.25 ▲0.0136.03 ▲2.12

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Elfsight Blocks: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲3814.68 ▲0.336.86 ▲4.9943.10 ▼6.11
Dashboard /wp-admin2,192 ▲125.52 ▼0.1484.29 ▼1.6438.93 ▼1.40
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0537.26 ▼4.9135.27 ▼5.18
Add New Post /wp-admin/post-new.php6,274 ▲4,74826.26 ▲2.391,047.58 ▲397.1341.09 ▼21.24
Media Library /wp-admin/upload.php1,394 ▼64.14 ▼0.0195.09 ▼11.0944.29 ▲0.16

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 detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 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 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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: gutenberg blocks, editor, blocks, gutenberg

elfsight-blocks/elfsight-blocks.php Passed 13 tests

The main PHP file in "Elfsight Blocks" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
Custom Gutenberg Blocks to embed the Elfsight Widgets.

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
No dangerous file extensions were detected7,254 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JSON2006,961
JavaScript33827237
PHP2185756

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected