89% toolbar-publish-button

Code Review | Toolbar Publish Button

WordPress plugin Toolbar Publish Button scored89%from 54 tests.

About plugin

  • Plugin page: toolbar-publish-b...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Mar 19, 2013
  • Latest release: Aug 28, 2021
  • Number of updates: 219
  • Update frequency: every 14.1 days
  • Top authors: webbistro (100%)

Code review

54 tests

User reviews

45 reviews

Install metrics

8,000+ active /83,584 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.97ms] Passed 4 tests

Server-side resources used by Toolbar Publish Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.72 ▼7.66
Dashboard /wp-admin3.33 ▲0.0345.89 ▼10.66
Posts /wp-admin/edit.php3.44 ▲0.0950.65 ▼4.63
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.18 ▼0.93
Media Library /wp-admin/upload.php3.25 ▲0.0235.19 ▼0.85
Toolbar Publish Button /wp-admin/options-general.php?page=tpb-settings3.2233.50

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 8 new options
New WordPress options
wpuxss_tpb_version
wpuxss_tpb_settings
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Toolbar Publish Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.34 ▲0.071.75 ▼0.5738.69 ▼5.54
Dashboard /wp-admin2,202 ▲255.63 ▼0.0388.14 ▼3.2039.65 ▼5.27
Posts /wp-admin/edit.php2,135 ▲382.04 ▲0.0843.43 ▲7.2842.09 ▲3.53
Add New Post /wp-admin/post-new.php1,538 ▲123.25 ▲5.00672.56 ▲52.7339.27 ▼35.23
Media Library /wp-admin/upload.php1,429 ▲294.23 ▲0.05103.86 ▼4.3944.58 ▼3.69
Toolbar Publish Button /wp-admin/options-general.php?page=tpb-settings1,2072.5047.8936.88

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
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • wpuxss_tpb_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • wpuxss_tpb_settings

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

toolbar-publish-button/toolbar-publish-button.php 92% from 13 tests

The main file in "Toolbar Publish Button" v. 1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 184 characters long)

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
No dangerous file extensions were detected534 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP2201183281
JavaScript410912175
CSS16156
SVG10022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin