89% fd-buttons-gutenberg

Code Review | Buttons for Gutenberg

WordPress plugin Buttons for Gutenberg scored89%from 54 tests.

About plugin

  • Plugin page: fd-buttons-gutenberg
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 22, 2018
  • Latest release: Aug 14, 2021
  • Number of updates: 6
  • Update frequency: every 166.0 days
  • Top authors: shaikhaezaz80 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Buttons for Gutenberg
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.22 ▼4.62
Dashboard /wp-admin3.31 ▲0.0148.52 ▼2.63
Posts /wp-admin/edit.php3.36 ▲0.0149.04 ▲0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.43 ▼1.63
Media Library /wp-admin/upload.php3.24 ▲0.0137.58 ▼0.06

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Buttons for Gutenberg: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.28 ▼1.101.79 ▼0.4545.32 ▲1.18
Dashboard /wp-admin2,206 ▲184.86 ▼0.99107.98 ▼5.5137.86 ▼4.88
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0439.85 ▲3.8835.65 ▲2.98
Add New Post /wp-admin/post-new.php6,354 ▲4,82127.85 ▲4.67914.40 ▲251.6165.27 ▲10.98
Media Library /wp-admin/upload.php1,382 ▼04.19 ▼0.0198.03 ▼9.4743.71 ▲0.18

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "paypal.me/FlickDevs"
The official readme.txt is a good inspiration

fd-buttons-gutenberg/fd-buttons-gutenberg.php 92% from 13 tests

The main file in "Buttons for Gutenberg" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 186 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin50 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP386236
Sass11111
CSS2002
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin