84% insert-giphy-block

Code Review | Insert Giphy Block

WordPress plugin Insert Giphy Block scored 84% from 54 tests.

About plugin

  • Plugin page: insert-giphy-block
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 19, 2020
  • Latest release: Mar 19, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: donmhico (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active / 8,072 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 gracefully, with no errors

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

A check of server-side resources used by Insert Giphy Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.91 ▼0.58
Dashboard /wp-admin3.33 ▲0.0347.68 ▼1.78
Posts /wp-admin/edit.php3.38 ▲0.0246.87 ▼1.81
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.68 ▼17.55
Media Library /wp-admin/upload.php3.25 ▲0.0234.82 ▼0.34

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Insert Giphy Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6714.74 ▲0.361.74 ▼0.0145.28 ▲2.71
Dashboard /wp-admin2,203 ▲174.86 ▼0.12101.67 ▼4.6539.51 ▼5.53
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0134.02 ▼5.0035.25 ▼0.07
Add New Post /wp-admin/post-new.php6,587 ▲5,07329.23 ▲11.63909.74 ▲242.0757.14 ▼1.09
Media Library /wp-admin/upload.php1,385 ▼04.20 ▼0.0395.78 ▼20.0145.97 ▼1.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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)
Good news, no errors were detected

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function DonMhico\\Insert_Giphy_Block\\add_action() in wp-content/plugins/insert-giphy-block/insert-giphy-block.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: gif, gutenberg, giphy

insert-giphy-block/insert-giphy-block.php Passed 13 tests

"Insert Giphy Block" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
Search and insert a Giphy directly from your Gutenberg editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin13,844 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JSON20013,163
JavaScript881134567
PHP2142477
CSS281137

PHP code Passed 2 tests

This is a short overview 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.04
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin