84% front-tool-bar

Code Review | Front Tool Bar

WordPress plugin Front Tool Bar scored84%from 54 tests.

About plugin

  • Plugin page: front-tool-bar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Mar 26, 2019
  • Latest release: Mar 26, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wisdominfosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /435 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Front Tool Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.16 ▲1.96
Dashboard /wp-admin3.31 ▲0.0144.28 ▼3.09
Posts /wp-admin/edit.php3.36 ▲0.0143.20 ▼2.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.01 ▼14.32
Media Library /wp-admin/upload.php3.23 ▲0.0134.10 ▲2.00
Front Tool Bar /wp-admin/options-general.php?page=front-tool-bar-settings3.2029.13

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Front Tool Bar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.59 ▼1.181.66 ▼0.1243.58 ▼3.30
Dashboard /wp-admin2,207 ▲165.77 ▲0.9094.36 ▼13.2937.61 ▼2.94
Posts /wp-admin/edit.php2,093 ▲12.17 ▲0.1636.38 ▼4.7630.94 ▼2.73
Add New Post /wp-admin/post-new.php1,517 ▲317.60 ▼0.14643.95 ▼47.8260.62 ▼0.75
Media Library /wp-admin/upload.php1,392 ▲74.18 ▲0.01101.05 ▼7.4141.68 ▼6.58
Front Tool Bar /wp-admin/options-general.php?page=front-tool-bar-settings7952.0323.9028.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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)
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/front-tool-bar/includes/admin-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires php: Version not formatted correctly
  • Screenshots: Please add an image for screenshot #1 (Front_Tool_Bar_Admin_End_Without_Check)
You can take inspiration from this readme.txt

front-tool-bar/front-tool-bar.php Passed 13 tests

Analyzing the main PHP file in "Front Tool Bar" version 1.0
98 characters long description:
Custom plugin to enable or disable WordPress Admin Tool bar on frontend for all users at one time.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected94 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP352494

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Front_Tool_Bar_Front_End_With_Check.png51.81KB15.00KB▼ 71.04%
Front_Tool_Bar_Admin_End_With_Check.png9.18KB3.75KB▼ 59.19%
Front_Tool_Bar_Admin_End_Without_Check.png42.81KB12.41KB▼ 71.01%
Front_Tool_Bar_Front_End_Without_Check.png58.88KB17.95KB▼ 69.51%