78% ff-block-gist-embed

Code Review | FF Block Gist Embed

WordPress plugin FF Block Gist Embed scored78%from 54 tests.

About plugin

  • Plugin page: ff-block-gist-embed
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: May 3, 2019
  • Latest release: Jun 20, 2019
  • Number of updates: 9
  • Update frequency: every 5.4 days
  • Top authors: frisfruitig (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /753 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.55ms] Passed 4 tests

An overview of server-side resources used by FF Block Gist Embed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.88 ▲3.33
Dashboard /wp-admin3.34 ▼0.0047.07 ▼13.20
Posts /wp-admin/edit.php3.46 ▲0.1045.67 ▼2.44
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.01 ▼21.87
Media Library /wp-admin/upload.php3.27 ▲0.0435.78 ▲3.40

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

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

Browser metrics Passed 4 tests

Checking browser requirements for FF Block Gist Embed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.25 ▼0.331.65 ▲0.0741.28 ▲0.41
Dashboard /wp-admin2,198 ▲175.61 ▲0.0284.43 ▼15.2341.89 ▼2.20
Posts /wp-admin/edit.php2,097 ▼32.04 ▲0.0035.69 ▼0.1033.70 ▼1.64
Add New Post /wp-admin/post-new.php6,369 ▲4,83227.74 ▲9.27826.60 ▲194.6560.40 ▼10.78
Media Library /wp-admin/upload.php1,400 ▼04.33 ▲0.1795.96 ▼0.6942.86 ▼2.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ff-block-gist-embed/api-fetch/get-gist-files/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ff-block-gist-embed/src/render.php:82

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
6 plugin tags: raw, embed, github, gist, code...

ff-block-gist-embed/plugin.php 92% from 13 tests

The principal PHP file in "FF Block Gist Embed" v. 1.0.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ff-block-gist-embed.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin213 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP669266210
CSS2002
JavaScript1001

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.23
Average class complexity4.50
▷ Minimum class complexity4.00
▷ Maximum class complexity5.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods850.00%
▷ Protected methods318.75%
▷ Private methods531.25%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin