84% post-read-unread-floating-sticky-button

Code Review | Smart Floating / Sticky Buttons For Post and Page Read Status

WordPress plugin Smart Floating / Sticky Buttons For Post and Page Read Status scored84%from 54 tests.

About plugin

  • Plugin page: post-read-unread-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Apr 13, 2021
  • Latest release: Apr 13, 2021
  • Number of updates: 3
  • Update frequency: every 5.7 days
  • Top authors: romal4u (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.55ms] Passed 4 tests

Server-side resources used by Smart Floating / Sticky Buttons For Post and Page Read Status
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.68 ▲3.44
Dashboard /wp-admin3.31 ▼0.0353.08 ▼13.37
Posts /wp-admin/edit.php3.36 ▲0.0153.82 ▼3.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.75 ▼8.29
Media Library /wp-admin/upload.php3.23 ▲0.0139.65 ▲5.01

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: 1 new table, 6 new options
New tables
wp_pre_read_unread
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Floating / Sticky Buttons For Post and Page Read Status
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲12714.08 ▼0.226.59 ▲3.8948.66 ▲0.39
Dashboard /wp-admin2,215 ▲275.89 ▲1.00100.25 ▼11.6239.42 ▼1.32
Posts /wp-admin/edit.php2,101 ▲92.00 ▲0.0134.11 ▼9.2134.28 ▼1.46
Add New Post /wp-admin/post-new.php1,556 ▲2323.21 ▲0.21679.81 ▲75.5953.26 ▲1.27
Media Library /wp-admin/upload.php1,400 ▲124.17 ▼0.02110.89 ▲7.6151.28 ▲7.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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 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 take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-read-unread-floating-sticky-button/vee_Read_unread_report.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-read-unread-floating-sticky-button/vee_Read_unread_report.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/post-read-unread-floating-sticky-button/post_read_unread.php:32
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/post-read-unread-floating-sticky-button/vee_Read_unread_report.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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: sticky button, post read report, page read button, smart read button, post read button...

post-read-unread-floating-sticky-button/post_read_unread.php 92% from 13 tests

The main PHP file in "Smart Floating / Sticky Buttons For Post and Page Read Status" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-read-unread-floating-sticky-button.php" instead of "post_read_unread.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 plugin346 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25017230
JavaScript111173
CSS17043

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.54MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png147.54KB64.54KB▼ 56.25%
assets/screenshot-5.png46.29KB18.44KB▼ 60.17%
assets/screenshot-3.png123.78KB53.51KB▼ 56.77%
assets/screenshot-1.png107.02KB45.85KB▼ 57.16%
assets/screenshot-4.png132.89KB57.17KB▼ 56.98%