83% floating-publish-button

Code Review | Floating Publish Button

WordPress plugin Floating Publish Button scored83%from 54 tests.

About plugin

  • Plugin page: floating-publish-...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Jan 16, 2014
  • Latest release: Dec 12, 2014
  • Number of updates: 17
  • Update frequency: every 19.5 days
  • Top authors: sondoha (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /9,070 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Floating Publish Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.99 ▼3.06
Dashboard /wp-admin3.31 ▲0.0144.66 ▼5.04
Posts /wp-admin/edit.php3.36 ▲0.0151.07 ▲1.96
Add New Post /wp-admin/post-new.php5.91 ▲0.0379.92 ▼14.69
Media Library /wp-admin/upload.php3.23 ▲0.0135.00 ▼1.80

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

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

Browser metrics Passed 4 tests

Floating Publish Button: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.27 ▼1.174.10 ▲2.4841.04 ▼0.93
Dashboard /wp-admin2,210 ▲224.87 ▼0.96118.70 ▲17.6042.83 ▼2.77
Posts /wp-admin/edit.php2,096 ▲72.08 ▲0.0639.56 ▲3.4835.12 ▲1.39
Add New Post /wp-admin/post-new.php1,518 ▲417.69 ▲0.16689.64 ▼16.1754.07 ▼0.91
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.04107.42 ▲0.0242.45 ▼1.05

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

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 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/floating-publish-button/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
The official readme.txt might help

floating-publish-button/index.php 85% from 13 tests

The principal PHP file in "Floating Publish Button" v. 1.0.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("floating-publish-button.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected40 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1101035
JavaScript22105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin