84% clear-floats-button

Code Review | Clear Floats Button

WordPress plugin Clear Floats Button scored84%from 54 tests.

About plugin

  • Plugin page: clear-floats-button
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-6.0
  • WordPress version: 6.3.1
  • First release: Oct 26, 2015
  • Latest release: Jul 11, 2022
  • Number of updates: 48
  • Update frequency: every 51.1 days
  • Top authors: zeno.popovici (64.58%)graffino (37.5%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /21,574 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.72ms] Passed 4 tests

Server-side resources used by Clear Floats Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.73 ▼2.66
Dashboard /wp-admin3.32 ▲0.0252.05 ▼6.62
Posts /wp-admin/edit.php3.37 ▲0.0248.94 ▼5.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.14 ▼16.37
Media Library /wp-admin/upload.php3.24 ▲0.0140.28 ▲2.38

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Clear Floats Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.131.59 ▼0.0843.22 ▼0.25
Dashboard /wp-admin2,192 ▲185.52 ▼0.0987.34 ▼5.4442.27 ▼2.89
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0136.68 ▼6.2432.73 ▼4.26
Add New Post /wp-admin/post-new.php1,526 ▼1123.04 ▲4.96667.32 ▼20.2456.54 ▼23.02
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0199.83 ▼9.3443.21 ▼6.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clear-floats-button/class-clear-floats-button.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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: editor, tinymce, edit, wysiwyg, float...

clear-floats-button/class-clear-floats-button.php 92% from 13 tests

"Clear Floats Button" version 1.2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("clear-floats-button.php" instead of "class-clear-floats-button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin242 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
Markdown256072
JavaScript2103158
SVG10156
PHP1175242
CSS20014

PHP code Passed 2 tests

An short overview of 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.10
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
mce/clear/images/clear-line.png0.38KB0.40KB0.00%