84% discreet-toolbar

Code Review | Discreet Toolbar

WordPress plugin Discreet Toolbar scored84%from 54 tests.

About plugin

  • Plugin page: discreet-toolbar
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.6
  • WordPress version: 6.3.1
  • First release: Mar 8, 2012
  • Latest release: Sep 18, 2016
  • Number of updates: 15
  • Update frequency: every 110.3 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,726 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.72ms] Passed 4 tests

This is a short check of server-side resources used by Discreet Toolbar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0151.50 ▲8.38
Dashboard /wp-admin3.32 ▼0.0348.04 ▼25.49
Posts /wp-admin/edit.php3.37 ▲0.0150.91 ▲0.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.01 ▼19.10
Media Library /wp-admin/upload.php3.24 ▲0.0137.00 ▲0.85

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Discreet Toolbar: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,031 ▲28514.03 ▲0.0711.69 ▲9.9542.28 ▼1.51
Dashboard /wp-admin2,206 ▲184.85 ▼1.04101.74 ▼4.1938.90 ▼5.66
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0940.47 ▼2.0935.56 ▼3.57
Add New Post /wp-admin/post-new.php1,533 ▼023.23 ▲0.47616.83 ▼27.5260.34 ▲10.37
Media Library /wp-admin/upload.php1,385 ▲34.17 ▼0.0697.18 ▼2.6043.53 ▲0.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/discreet-toolbar/discreet-toolbar.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention: Please take inspiration from this readme.txt

discreet-toolbar/discreet-toolbar.php Passed 13 tests

The entry point to "Discreet Toolbar" version 0.4 is a PHP file that has certain tags in its header comment area
54 characters long description:
Hide Admin Bar till cursor is near it. Front-end only.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin59 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript27530
PHP193529

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin