84% floating-icons

Code Review | Floating Icons

WordPress plugin Floating Icons scored84%from 54 tests.

About plugin

  • Plugin page: floating-icons
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 6.3.1
  • First release: Nov 2, 2018
  • Latest release: Sep 11, 2023
  • Number of updates: 28
  • Update frequency: every 63.4 days
  • Top authors: ak.singla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,899 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
This plugin's installer ran successfully

Server metrics [RAM: ▲2.92MB] [CPU: ▲28.84ms] Passed 4 tests

Server-side resources used by Floating Icons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.54 ▲3.0874.50 ▲37.94
Dashboard /wp-admin6.27 ▲2.9274.07 ▲14.15
Posts /wp-admin/edit.php6.30 ▲2.9477.44 ▲31.51
Add New Post /wp-admin/post-new.php8.83 ▲2.94130.12 ▲38.98
Media Library /wp-admin/upload.php6.13 ▲2.9068.97 ▲31.76
Redux /wp-admin/options-general.php?page=redux-framework6.1271.43

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 853 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
omfe_opts
theysaidso_admin_options
omfe_opts-transients
db_upgraded
widget_recent-posts
omfe_install_date
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Floating Icons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18714.28 ▼0.072.53 ▲1.0034.78 ▼2.52
Dashboard /wp-admin2,259 ▲795.61 ▼0.0785.19 ▼0.5688.30 ▲45.88
Posts /wp-admin/edit.php2,194 ▲942.03 ▼0.0140.64 ▲4.9435.08 ▲1.03
Add New Post /wp-admin/post-new.php1,564 ▲3818.18 ▼5.36640.34 ▼59.7862.75 ▼2.63
Media Library /wp-admin/upload.php1,420 ▲174.27 ▲0.0894.55 ▼5.1642.76 ▲0.28
Redux /wp-admin/options-general.php?page=redux-framework1,0223.3169.6784.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • omfe_opts-transients
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 48× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/floating-icons/adminside/admin/redux-framework/redux-core/inc/fields/date/field_date.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/floating-icons/adminside/admin/redux-framework/redux-core/inc/fields/image_select/field_image_select.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/floating-icons/adminside/admin/redux-framework/redux-core/core/newsflash.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/floating-icons/adminside/admin/redux-framework/redux-core/templates/panel/header.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/floating-icons/adminside/admin/redux-framework/redux-core/inc/fields/border/field_border.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/floating-icons/adminside/admin/redux-framework/redux-core/templates/panel/content.tpl.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/floating-icons/adminside/admin/redux-framework/redux-core/templates/panel/header-stickybar.tpl.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-icons/adminside/admin/tgm-init.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/floating-icons/adminside/admin/redux-framework/redux-core/inc/fields/spinner/field_spinner.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/floating-icons/adminside/admin/redux-framework/redux-core/inc/fields/divide/field_divide.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues 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
6 plugin tags: floating, moving icons, christmas trees, special effects, floating icons...

floating-icons/floating-icons.php 92% from 13 tests

The main file in "Floating Icons" v. 1.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 217 characters long)

Code Analysis 97% from 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
No dangerous file extensions were detected81,108 lines of code in 573 files:
LanguageFilesBlank linesComment linesLines of code
PHP2157,16012,80728,430
JavaScript1426,1553,36425,760
CSS1116,68932512,709
Sass971,8727912,601
SVG7001,601
XML1007

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 110)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity37.04
▷ Minimum class complexity1.00
▷ Maximum class complexity322.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity110.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes148
▷ Abstract classes42.70%
▷ Concrete classes14497.30%
▷ Final classes00.00%
Methods1,087
▷ Static methods29326.95%
▷ Public methods85178.29%
▷ Protected methods14012.88%
▷ Private methods968.83%
Functions37
▷ Named functions3286.49%
▷ Anonymous functions513.51%
Constants111
▷ Global constants54.50%
▷ Class constants10695.50%
▷ Public constants106100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
53 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
adminside/admin/redux-framework/redux-core/assets/img/jquery-ui-bootstrap/ui-icons_ffffff_256x240.png4.10KB4.11KB0.00%
adminside/admin/redux-framework/redux-core/assets/img/jquery-ui-bootstrap/ui-icons_cd0a0a_256x240.png4.10KB4.11KB0.00%
adminside/admin/redux-framework/redux-core/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
adminside/admin/redux-framework/redux-core/assets/img/3cm.png0.30KB0.29KB▼ 3.93%
adminside/admin/redux-framework/redux-core/assets/img/raw/jquery-ui-bootstrap/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%