84% bottom-fixed-window

Code Review | Bottom suspended window, 底部悬浮窗

WordPress plugin Bottom suspended window, 底部悬浮窗 scored84%from 54 tests.

About plugin

  • Plugin page: bottom-fixed-window
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: Sep 16, 2019
  • Latest release: Sep 27, 2019
  • Number of updates: 5
  • Update frequency: every 2.2 days
  • Top authors: cc2017 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,021 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.94ms] Passed 4 tests

A check of server-side resources used by Bottom suspended window, 底部悬浮窗
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.54 ▼2.62
Dashboard /wp-admin3.37 ▲0.0750.45 ▼1.49
Posts /wp-admin/edit.php3.49 ▲0.1351.28 ▼0.64
Add New Post /wp-admin/post-new.php5.95 ▲0.0795.77 ▼2.99
Media Library /wp-admin/upload.php3.30 ▲0.0740.08 ▲4.36

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Bottom suspended window, 底部悬浮窗: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲13613.45 ▼1.178.01 ▲6.3647.18 ▲4.42
Dashboard /wp-admin2,204 ▲275.63 ▼0.0292.47 ▼0.6041.27 ▲0.20
Posts /wp-admin/edit.php2,112 ▲91.95 ▼0.0441.62 ▲0.5237.36 ▲0.63
Add New Post /wp-admin/post-new.php1,538 ▲1223.01 ▼0.01614.58 ▼53.9761.03 ▼6.65
Media Library /wp-admin/upload.php1,415 ▲124.22 ▲0.00101.60 ▼2.1143.36 ▼1.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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)
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bottom-fixed-window/cancms-float-bar.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
5 plugin tags: sticky bar, suspended window, fixed bar, ads, bottom bar

bottom-fixed-window/cancms-float-bar.php 85% from 13 tests

"Bottom suspended window, 底部悬浮窗" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bottom-fixed-window.php" instead of "cancms-float-bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin623 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP16215200573
CSS26129
JSON21015
JavaScript1316

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.78
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods49
▷ Static methods1530.61%
▷ Public methods4591.84%
▷ Protected methods00.00%
▷ Private methods48.16%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.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
3 PNG files occupy 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-2.png51.20KB24.17KB▼ 52.78%
screenshots/screenshot-1.png96.03KB44.01KB▼ 54.17%
screenshots/icon256.png2.55KB0.65KB▼ 74.39%