84% wp-toolbar-flags

Code Review | Toolbar flags

WordPress plugin Toolbar flags scored84%from 54 tests.

About plugin

  • Plugin page: wp-toolbar-flags
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.3
  • WordPress version: 6.3.1
  • First release: May 1, 2012
  • Latest release: Jan 30, 2020
  • Number of updates: 7
  • Update frequency: every 404.3 days
  • Top authors: ScottJWalter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.54ms] Passed 4 tests

Analyzing server-side resources used by Toolbar flags
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.13 ▼4.09
Dashboard /wp-admin3.31 ▲0.0141.91 ▼9.43
Posts /wp-admin/edit.php3.36 ▲0.0147.37 ▲3.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.86 ▲1.10
Media Library /wp-admin/upload.php3.23 ▲0.0133.38 ▼1.75

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Toolbar flags
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.30 ▼1.251.73 ▼0.1332.33 ▼17.13
Dashboard /wp-admin2,233 ▲455.85 ▲0.96106.00 ▼8.4441.83 ▼3.20
Posts /wp-admin/edit.php2,112 ▲232.04 ▲0.0438.64 ▲4.5137.49 ▲1.88
Add New Post /wp-admin/post-new.php1,563 ▲2118.45 ▼0.23638.87 ▲1.1765.58 ▲7.40
Media Library /wp-admin/upload.php1,415 ▲274.22 ▼0.0796.40 ▼10.5443.30 ▲2.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 fix 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/wp-toolbar-flags/plugin.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: administration, admin, security

wp-toolbar-flags/plugin.php 92% from 13 tests

The main PHP file in "Toolbar flags" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-toolbar-flags.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin97 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1222172
Markdown117025

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.74
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
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
PNG images were not found in this plugin