84% embed-gfycat-block

Code Review | Embed Gfycat Block

WordPress plugin Embed Gfycat Block scored84%from 54 tests.

About plugin

  • Plugin page: embed-gfycat-block
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 29, 2020
  • Latest release: Apr 7, 2023
  • Number of updates: 5
  • Update frequency: every 214.6 days
  • Top authors: joanrodas (60%)sirvelia (60%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /658 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 gracefully, with no errors

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

A check of server-side resources used by Embed Gfycat Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0146.94 ▲1.50
Dashboard /wp-admin3.36 ▲0.0152.54 ▼1.96
Posts /wp-admin/edit.php3.41 ▲0.0148.60 ▼3.17
Add New Post /wp-admin/post-new.php5.94 ▲0.0188.87 ▼19.09
Media Library /wp-admin/upload.php3.28 ▲0.0141.85 ▲5.22

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Embed Gfycat Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.35 ▼0.271.83 ▼0.0843.74 ▲0.12
Dashboard /wp-admin2,198 ▲215.64 ▲0.0293.91 ▲2.6941.98 ▼1.38
Posts /wp-admin/edit.php2,100 ▲31.98 ▼0.0434.40 ▼0.7136.42 ▲2.26
Add New Post /wp-admin/post-new.php6,366 ▲4,83827.73 ▲4.73949.41 ▲314.2654.32 ▼4.62
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.11105.02 ▲1.8446.70 ▲0.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-gfycat-block/embed-gfycat-block.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
4 plugin tags: block, gif, gutenberg, gfycat

embed-gfycat-block/embed-gfycat-block.php 85% from 13 tests

The main PHP file in "Embed Gfycat Block" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.2" instead of "7.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected290 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript74235210
JSON20042
Sass111131
PHP22276
CSS2101

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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
There are no PNG files in this plugin