84% yts-floating-action-button

Code Review | YTS Floating action button

WordPress plugin YTS Floating action button scored84%from 54 tests.

About plugin

  • Plugin page: yts-floating-acti...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2022
  • Latest release: Nov 8, 2022
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: yigitus2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /201 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by YTS Floating action button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0629.09 ▼14.86
Dashboard /wp-admin3.33 ▲0.0349.47 ▼5.76
Posts /wp-admin/edit.php3.38 ▲0.0351.00 ▲6.56
Add New Post /wp-admin/post-new.php5.93 ▲0.0591.03 ▼7.16
Media Library /wp-admin/upload.php3.26 ▲0.0334.58 ▼0.70
YTS Floating action button /wp-admin/themes.php?page=yts-fab3.2434.27

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for YTS Floating action button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.60 ▼0.774.72 ▲2.8438.32 ▼7.47
Dashboard /wp-admin2,214 ▲255.81 ▼0.07100.13 ▼26.1439.99 ▼9.10
Posts /wp-admin/edit.php2,097 ▲82.03 ▲0.0439.47 ▲0.6436.73 ▲2.52
Add New Post /wp-admin/post-new.php1,521 ▼1223.53 ▲0.16588.60 ▼88.4756.06 ▲2.86
Media Library /wp-admin/upload.php1,399 ▲144.11 ▼0.09106.78 ▲13.4544.80 ▲3.83
YTS Floating action button /wp-admin/themes.php?page=yts-fab1,0743.0139.3071.36

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

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

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/yts-floating-action-button/admin/partials/yts-fab-admin-display.php
    • > /wp-content/plugins/yts-floating-action-button/public/partials/yts-fab-public-display.php

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 Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: floating action button, fab, action button, whatsapp button

yts-floating-action-button/yts-fab.php 85% from 13 tests

The principal PHP file in "YTS Floating action button" v. 1.0.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yts-floating-action-button.php" instead of "yts-fab.php")

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
Success! There were no dangerous files found in this plugin515 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13160536426
JavaScript2163359
CSS25930

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.75
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods38
▷ Static methods37.89%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/placeholder.png12.50KB3.68KB▼ 70.52%
public/placeholder.png12.50KB3.68KB▼ 70.52%