84% embed-block-for-github

Code Review | Embed Block for GitHub

WordPress plugin Embed Block for GitHub scored84%from 54 tests.

About plugin

  • Plugin page: embed-block-for-g...
  • Plugin version: 0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2019
  • Latest release: Oct 26, 2022
  • Number of updates: 17
  • Update frequency: every 68.1 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /7,085 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.03MB] [CPU: ▼3.22ms] Passed 4 tests

Analyzing server-side resources used by Embed Block for GitHub
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.45 ▼1.22
Dashboard /wp-admin3.34 ▲0.0355.75 ▲1.93
Posts /wp-admin/edit.php3.39 ▲0.0349.19 ▼3.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.25 ▼9.61
Media Library /wp-admin/upload.php3.26 ▲0.0340.02 ▲4.27

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Embed Block for GitHub
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.23 ▼0.041.79 ▼0.0542.49 ▼2.76
Dashboard /wp-admin2,195 ▲245.51 ▼0.3287.78 ▼12.5938.54 ▼6.55
Posts /wp-admin/edit.php2,100 ▲32.03 ▼0.0134.16 ▼1.7932.94 ▼3.25
Add New Post /wp-admin/post-new.php6,366 ▲4,84027.79 ▲4.34900.57 ▲258.3263.13 ▲9.21
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0198.09 ▼7.9563.35 ▲19.17

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/embed-block-for-github/templates/repository.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
9 plugin tags: embed, gutenberg, block, git, gist...

embed-block-for-github/embed-block-for-github.php Passed 13 tests

"Embed Block for GitHub" version 0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
53 characters long description:
Easily embed GitHub repositories in Gutenberg Editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected500 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP32121188
CSS2290160
JavaScript18090
SVG50162

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods327.27%
▷ Protected methods00.00%
▷ Private methods872.73%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.68MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png13.00KB5.24KB▼ 59.65%
assets/screenshot-2.png30.56KB8.01KB▼ 73.78%
assets/banner-772x250.png85.98KB27.28KB▼ 68.27%
assets/banner-1544x500.png208.37KB68.25KB▼ 67.24%
assets/icon-128x128.png8.81KB3.12KB▼ 64.59%