10% tinymce-backslash-button

Code Review | TinyMCE Backslash Button

WordPress plugin TinyMCE Backslash Button scored10%from 54 tests.

About plugin

  • Plugin page: tinymce-backslash...
  • Plugin version: 0.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.3.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2011
  • Latest release: Feb 1, 2012
  • Number of updates: 37
  • Update frequency: every 2.8 days
  • Top authors: redcocker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,626 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/tinymce-backslash-button/tinymce-backslash-button.php+31
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.72ms] Passed 4 tests

Analyzing server-side resources used by TinyMCE Backslash Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.85 ▼0.17
Dashboard /wp-admin3.39 ▲0.0952.24 ▼2.35
Posts /wp-admin/edit.php3.51 ▲0.1547.95 ▼8.17
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.21 ▼18.32
Media Library /wp-admin/upload.php3.32 ▲0.0936.77 ▼2.02
TinyMCE Backslash /wp-admin/options-general.php?page=tinymce-backslash-options3.2632.07

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
tinymce_backslash_setting_opt
widget_theysaidso_widget
widget_recent-comments
tinymce_backslash_updated
tinymce_backslash_checkver_stamp
widget_recent-posts
db_upgraded
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

An overview of browser requirements for TinyMCE Backslash Button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲1714.27 ▼0.391.75 ▼0.2645.56 ▲1.83
Dashboard /wp-admin2,203 ▲235.62 ▼0.0193.50 ▼4.4743.55 ▼1.90
Posts /wp-admin/edit.php2,114 ▲142.13 ▲0.1440.51 ▲2.3835.54 ▼2.26
Add New Post /wp-admin/post-new.php1,544 ▲1823.14 ▼0.43670.39 ▼30.5360.76 ▲0.85
Media Library /wp-admin/upload.php1,414 ▲144.20 ▼0.0397.30 ▼11.3242.08 ▼6.33
TinyMCE Backslash /wp-admin/options-general.php?page=tinymce-backslash-options8521.517.2726.36

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
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=tinymce-backslash-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=tinymce-backslash-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=tinymce-backslash-options
    • > Error in wp-content/plugins/tinymce-backslash-button/tinymce-backslash-button.php+314
    Uncaught Error: Call to undefined function mysql_get_server_info() in wp-content/plugins/tinymce-backslash-button/tinymce-backslash-button.php:314
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): TinyMCE_Backslash_Button->tinymce_backslash_options_panel()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #5 {main}
    thrown

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/tinymce-backslash-button/tinymce-backslash-button.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (This is the button on Visual editor(TinyMCE).), #2 (This is the button on HTML editor.), #3 (This is entered backslashes.), #4 (This is setting panel.)
The official readme.txt is a good inspiration

tinymce-backslash-button/tinymce-backslash-button.php 85% from 13 tests

"TinyMCE Backslash Button" version 0.2.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected417 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP22745271
PO File1424199
JavaScript211842
CSS1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tinymce/backslash.png2.97KB0.16KB▼ 94.68%