88% floating-div

Code Review | Floating Div

WordPress plugin Floating Div scored 88% from 54 tests.

About plugin

  • Plugin page: floating-div
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 5.9.2
  • First release: Mar 6, 2016
  • Latest release: Nov 19, 2017
  • Number of updates: 51
  • Update frequency: every 12.2 days
  • Top authors: PluginlySpeaking (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active / 17,250 total downloads

Benchmarks

Plugin footprint Passed 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼316.04ms] Passed 4 tests

Analyzing server-side resources used by Floating Div
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1760.62 ▼17.24
Dashboard /wp-admin3.55 ▲0.1533.77 ▼6.42
Posts /wp-admin/edit.php3.78 ▲0.1436.66 ▼4.40
Add New Post /wp-admin/post-new.php7.03 ▲0.0696.87 ▼1,236.09
Media Library /wp-admin/upload.php3.43 ▲0.1444.74 ▲15.33
Add New /wp-admin/post-new.php?post_type=floating_div_ps3.7747.40
Floating Div /wp-admin/edit.php?post_type=floating_div_ps3.5755.28

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Floating Div: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,969 ▲24716.98 ▲1.2910.00 ▲2.482.75 ▲0.11
Dashboard /wp-admin2,932 ▲716.11 ▼0.04158.12 ▲5.23179.03 ▼52.70
Posts /wp-admin/edit.php2,726 ▲353.25 ▲0.0262.38 ▼7.27211.22 ▲5.38
Add New Post /wp-admin/post-new.php1,743 ▲8220.84 ▲4.80467.61 ▲23.64166.83 ▼12.42
Media Library /wp-admin/upload.php1,745 ▲475.61 ▲0.16147.12 ▼0.60189.47 ▲1.11
Add New /wp-admin/post-new.php?post_type=floating_div_ps4,55810.23255.34218.08
Floating Div /wp-admin/edit.php?post_type=floating_div_ps1,6675.0992.09121.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-div/pluginlyspeaking-floatingdiv.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=floating_div_ps
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2 1:31592 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=floating_div_ps:451:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=floating_div_ps
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2 1:31592 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=floating_div_ps:837:31)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2:2:30340)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=floating_div_ps
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.9.2 1:31702 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: scrolling, responsive, floating div, div, floating...

floating-div/pluginlyspeaking-floatingdiv.php 85% from 13 tests

The main PHP file in "Floating Div" ver. 3.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 156 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("floating-div.php" instead of "pluginlyspeaking-floatingdiv.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,196 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP110813940
CSS2613228
JavaScript2101328

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.31
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%
Functions22
▷ Named functions22100.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
There are no PNG files in this plugin