10% fluid

Code Review | Fluid

WordPress plugin Fluid scored10%from 54 tests.

About plugin

  • Plugin page: fluid
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 7, 2018
  • Latest release: Aug 7, 2018
  • Number of updates: 6
  • Update frequency: every 23.8 days
  • Top authors: pbearne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /906 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/fluid/includes/admin/class-settings-page.php+489
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.79MB] [CPU: ▼54.00ms] Passed 4 tests

This is a short check of server-side resources used by Fluid
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.299.72 ▼34.86
Dashboard /wp-admin2.23 ▼1.088.87 ▼48.15
Posts /wp-admin/edit.php2.23 ▼1.137.26 ▼44.18
Add New Post /wp-admin/post-new.php2.23 ▼3.666.30 ▼88.81
Media Library /wp-admin/upload.php2.23 ▼1.006.23 ▼33.64
Fluid.us /wp-admin/options-general.php?page=fluid-settings-admin2.236.39

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Fluid
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.24 ▼0.421.68 ▼0.1640.34 ▲1.37
Dashboard /wp-admin2,199 ▲225.53 ▼0.1685.24 ▼16.6138.68 ▼7.56
Posts /wp-admin/edit.php2,107 ▲102.00 ▲0.0039.03 ▲1.7035.04 ▼1.18
Add New Post /wp-admin/post-new.php6,362 ▲4,83425.88 ▲2.88884.44 ▲195.3857.73 ▲6.83
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.01102.76 ▼2.8145.47 ▼1.43
Fluid.us /wp-admin/options-general.php?page=fluid-settings-admin1,1102.1225.7034.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/fluid/includes/admin/class-settings-page.php+489
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=fluid-settings-admin
    • > Deprecated in wp-content/plugins/fluid/includes/admin/class-settings-page.php+489
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fluid-settings-admin
    • > Notice in wp-content/plugins/fluid/includes/admin/class-metaboxes.php+45
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=fluid-settings-admin
    • > Notice in wp-content/plugins/fluid/includes/class-content-control.php+284
    Trying to access array offset on value of type null

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fluid\\plugin_dir_path() in wp-content/plugins/fluid/fluid.php:47

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI found ("https:/fluid.us/")
You can take inspiration from this readme.txt

fluid/fluid.php Passed 13 tests

"Fluid" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
28 characters long description:
Micro payments with Fluid.us

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,146 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP104735251,096
JavaScript20448
CSS2022

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity19.00
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods73
▷ Static methods68.22%
▷ Public methods6082.19%
▷ Protected methods00.00%
▷ Private methods1317.81%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo-64x64.png5.56KB2.03KB▼ 63.53%