84% adminbar-drag-hide

Code Review | adminbar drag & hide

WordPress plugin adminbar drag & hide scored84%from 54 tests.

About plugin

  • Plugin page: adminbar-drag-hide
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 3, 2020
  • Latest release: Feb 4, 2020
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: finsaspa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /650 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by adminbar drag & hide
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.73 ▼1.98
Dashboard /wp-admin3.35 ▲0.0552.69 ▼3.97
Posts /wp-admin/edit.php3.40 ▲0.0551.32 ▼3.65
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.40 ▼5.49
Media Library /wp-admin/upload.php3.27 ▲0.0542.71 ▲2.32

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

adminbar drag & hide: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,008 ▲24713.56 ▼0.7918.19 ▲16.6453.53 ▲7.78
Dashboard /wp-admin2,195 ▲155.56 ▼0.1087.27 ▼1.5883.43 ▲41.97
Posts /wp-admin/edit.php2,118 ▲152.00 ▲0.0135.85 ▼1.0134.19 ▼4.15
Add New Post /wp-admin/post-new.php1,693 ▲16722.29 ▼1.29654.32 ▲21.2148.86 ▼14.44
Media Library /wp-admin/upload.php1,412 ▲184.17 ▼0.06103.23 ▲6.9673.35 ▲28.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/adminbar-drag-hide/adminbar-drag-hide.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adminbar-drag-hide/include/front-end.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adminbar-drag-hide/include/user-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adminbar-drag-hide/include/settings.php:5

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 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

adminbar-drag-hide/adminbar-drag-hide.php 92% from 13 tests

"adminbar drag & hide" 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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 163 characters long)

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
Good job! No executable or dangerous file extensions detected464 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP49727310
CSS1281140
JavaScript17014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-big.png1.18KB0.73KB▼ 37.71%
images/icon.png0.61KB0.49KB▼ 19.16%