84% fibrojedi-sticky-preview-publish-buttons

Code Review | FibroJedi's Sticky Preview and Publish Buttons

WordPress plugin FibroJedi's Sticky Preview and Publish Buttons scored84%from 54 tests.

About plugin

  • Plugin page: fibrojedi-sticky-...
  • Plugin version: 1.2.8
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 20, 2022
  • Latest release: Nov 9, 2023
  • Number of updates: 53
  • Update frequency: every 12.4 days
  • Top authors: fibrojedi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /729 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by FibroJedi's Sticky Preview and Publish Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.36 ▼1.94
Dashboard /wp-admin3.34 ▲0.0446.70 ▼1.89
Posts /wp-admin/edit.php3.40 ▲0.0445.63 ▼1.35
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.32 ▼1.25
Media Library /wp-admin/upload.php3.27 ▲0.0434.39 ▲2.72
Sticky Preview Buttons /wp-admin/options-general.php?page=fibrojedi-sppb3.2631.62

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 19 new options
New WordPress options
fibrojedi_sppb_disallowed_post_types
fj_sppb_previous_version
fibrojedi_sppb_slider
fibrojedi_sppb_mode
theysaidso_admin_options
fibrojedi_sppb_border_colour
fj_sppb_welcome_given
can_compress_scripts
widget_theysaidso_widget
fibrojedi_sppb_beta
...

Browser metrics Passed 4 tests

An overview of browser requirements for FibroJedi's Sticky Preview and Publish Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲5214.14 ▼0.151.70 ▲0.0444.03 ▼1.29
Dashboard /wp-admin2,207 ▲305.64 ▲0.0286.65 ▼12.8938.24 ▼5.75
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0635.66 ▼0.5333.73 ▲1.87
Add New Post /wp-admin/post-new.php6,248 ▲4,72226.03 ▲2.53855.90 ▲223.3653.13 ▼8.01
Media Library /wp-admin/upload.php1,409 ▲154.15 ▼0.0592.67 ▼7.3439.59 ▼2.59
Sticky Preview Buttons /wp-admin/options-general.php?page=fibrojedi-sppb1,4102.0223.6450.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • fibrojedi_update_method
    • fj_sppb_previous_version
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • fibrojedi_sppb_mode
    • can_compress_scripts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/fibrojedi-sticky-preview-publish-buttons/fibrojedi-sticky-preview-publish-buttons.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: admin-buttons, post-editing, publish-button, back-office, ui...

fibrojedi-sticky-preview-publish-buttons/fibrojedi-sticky-preview-publish-buttons.php 92% from 13 tests

The entry point to "FibroJedi's Sticky Preview and Publish Buttons" version 1.2.8 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 171 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
Everything looks great! No dangerous files found in this plugin810 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP27392712
CSS4131198

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.00%
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
No PNG images were found in this plugin