94% expandable-floating-div

Code Review | Expandable Floating Div

WordPress plugin Expandable Floating Div scored 94% from 54 tests.

About plugin

  • Plugin page: expandable-floati...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 5.8.1
  • First release: Apr 28, 2016
  • Latest release: Jul 23, 2016
  • Number of updates: 11
  • Update frequency: every 31.7 days
  • Top authors: PluginlySpeaking (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,290 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼139.66ms] Passed 4 tests

This is a short check of server-side resources used by Expandable Floating Div
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.20 ▲0.3738.35 ▲5.53
Dashboard /wp-admin3.51 ▲0.4556.60 ▲7.62
Posts /wp-admin/edit.php3.56 ▲0.4548.32 ▲5.37
Add New Post /wp-admin/post-new.php5.80 ▲0.3798.29 ▼566.54
Media Library /wp-admin/upload.php3.39 ▲0.3935.79 ▼2.98
Add New /wp-admin/post-new.php?post_type=exp_float_div_ps3.4343.27
Expandable Floating Div /wp-admin/edit.php?post_type=exp_float_div_ps3.4935.75
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.4531.90

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Expandable Floating Div
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,895 ▲29916.57 ▲0.9020.62 ▲9.3144.68 ▼3.99
Dashboard /wp-admin3,048 ▲1175.86 ▼0.12142.52 ▼12.74116.87 ▲3.38
Posts /wp-admin/edit.php2,821 ▲822.86 ▲0.1574.95 ▲10.8495.11 ▲7.39
Add New Post /wp-admin/post-new.php1,736 ▲6418.41 ▼0.47383.97 ▼33.20110.33 ▲5.87
Media Library /wp-admin/upload.php1,893 ▲865.09 ▲0.07165.55 ▲10.33128.61 ▲14.81
Add New /wp-admin/post-new.php?post_type=exp_float_div_ps1,9813.31104.11108.79
Expandable Floating Div /wp-admin/edit.php?post_type=exp_float_div_ps1,4962.6672.4287.84
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,3152.1062.7081.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/expandable-floating-div/class-tgm-plugin-activation.php:1883
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/expandable-floating-div/class-tgm-plugin-activation.php:1883

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: floating div, float, floating, pluginlyspeaking, expandable floating div...

expandable-floating-div/pluginlyspeaking-expandablefloatingdiv.php 92% from 13 tests

This is the main PHP file of "Expandable Floating Div" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("expandable-floating-div.php" instead of "pluginlyspeaking-expandablefloatingdiv.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,393 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25171,4481,976
JavaScript18221394
CSS10023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity44.14
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods94
▷ Static methods55.32%
▷ Public methods7478.72%
▷ Protected methods2021.28%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/left-dark.png1.08KB0.74KB▼ 31.83%
img/right-dark.png1.06KB0.73KB▼ 31.40%
img/disabled.png0.57KB0.67KB0.00%