79% xhe-quicktags

Code Review | XHE Quicktags

WordPress plugin XHE Quicktags scored79%from 54 tests.

About plugin

  • Plugin page: xhe-quicktags
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 4, 2021
  • Latest release: Apr 4, 2021
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: xhtmlexpert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /322 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.03MB] [CPU: ▼11.94ms] Passed 4 tests

An overview of server-side resources used by XHE Quicktags
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.0947.50 ▲3.40
Dashboard /wp-admin3.72 ▲0.1556.74 ▼13.51
Posts /wp-admin/edit.php3.77 ▲0.0953.29 ▲1.31
Add New Post /wp-admin/post-new.php5.78 ▼0.3674.38 ▼38.29
Media Library /wp-admin/upload.php3.58 ▲0.0942.58 ▲2.74
WP AddQuicktags /wp-admin/options-general.php?page=xheqt-settings3.6037.72

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 82 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by XHE Quicktags
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.44 ▼0.202.21 ▲0.1145.96 ▲3.19
Dashboard /wp-admin2,196 ▲165.64 ▼0.0596.17 ▲1.8746.14 ▲4.99
Posts /wp-admin/edit.php2,104 ▲11.98 ▼0.0236.29 ▼1.0635.90 ▼1.37
Add New Post /wp-admin/post-new.php1,532 ▼1317.64 ▼5.54686.17 ▲19.5454.00 ▼5.51
Media Library /wp-admin/upload.php1,404 ▲14.27 ▲0.05100.88 ▲0.1843.00 ▼0.84
WP AddQuicktags /wp-admin/options-general.php?page=xheqt-settings9862.1835.4829.94

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/xhe-quicktags/includes/class-admin.php
    • > /wp-content/plugins/xhe-quicktags/includes/class-admin-tinymce.php
    • > /wp-content/plugins/xhe-quicktags/includes/class-admin-settings.php
    • > /wp-content/plugins/xhe-quicktags/xhe-quicktags.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/xhe-quicktags/templates/html-admin-repeater-field.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/xhe-quicktags/templates/html-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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: tinymce, editor, button, buttons, add buttons...

xhe-quicktags/xhe-quicktags.php Passed 13 tests

The main PHP file in "XHE Quicktags" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
61 characters long description:
Allows you to add buttons to the WordPress admin text editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin11,059 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript682,6037849,774
CSS3611593
PHP712417545
Sass1310147

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity9.25
▷ Minimum class complexity2.00
▷ Maximum class complexity23.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods418.18%
▷ Public methods1777.27%
▷ Protected methods29.09%
▷ Private methods313.64%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected