89% globaldev-sticky-sidebar

Code Review | Globaldev Sidebar Button

WordPress plugin Globaldev Sidebar Button scored 89% from 54 tests.

About plugin

  • Plugin page: globaldev-sticky-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Nov 26, 2020
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: globaldevitus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,710 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.90ms] Passed 4 tests

Server-side resources used by Globaldev Sidebar Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.00 ▼0.04
Dashboard /wp-admin3.36 ▲0.0646.10 ▲0.23
Posts /wp-admin/edit.php3.41 ▲0.0544.86 ▼6.74
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.72 ▼12.61
Media Library /wp-admin/upload.php3.28 ▲0.0534.61 ▼0.21

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Globaldev Sidebar Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲10913.94 ▼0.871.92 ▲0.0640.25 ▼9.41
Dashboard /wp-admin2,246 ▲585.03 ▼0.04101.59 ▼0.0840.10 ▼4.05
Posts /wp-admin/edit.php2,128 ▲392.43 ▲0.3840.66 ▼0.4532.66 ▼4.65
Add New Post /wp-admin/post-new.php1,543 ▲923.37 ▲0.22654.58 ▲14.2836.37 ▼29.59
Media Library /wp-admin/upload.php1,425 ▲374.42 ▲0.23104.66 ▲7.8943.94 ▲1.65

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: stickysidebar

globaldev-sticky-sidebar/globaldev-sidebar-button.php 85% from 13 tests

The primary PHP file in "Globaldev Sidebar Button" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("globaldev-sticky-sidebar.php" instead of "globaldev-sidebar-button.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected410 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP22270223
CSS2235159
JavaScript29028

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.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

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/logo_globaldev.png1.86KB0.76KB▼ 59.30%
admin/images/logo_globaldev.png1.86KB0.76KB▼ 59.30%
admin/images/Logo_GD_black_transparent_final.png1.86KB1.86KB0.00%