84% download-html-tinymce-button

Code Review | Download HTML TinyMCE Button

WordPress plugin Download HTML TinyMCE Button scored84%from 54 tests.

About plugin

  • Plugin page: download-html-tin...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.0
  • WordPress version: 6.3.1
  • First release: Jun 11, 2014
  • Latest release: Sep 5, 2014
  • Number of updates: 17
  • Update frequency: every 5.1 days
  • Top authors: sfarbota (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /4,392 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Download HTML TinyMCE Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.26 ▼4.81
Dashboard /wp-admin3.31 ▲0.0143.95 ▼6.10
Posts /wp-admin/edit.php3.36 ▲0.0146.54 ▼2.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.86 ▼5.57
Media Library /wp-admin/upload.php3.23 ▲0.0132.12 ▼2.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Download HTML TinyMCE Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.26 ▼1.151.67 ▼0.9245.17 ▲2.59
Dashboard /wp-admin2,211 ▲234.80 ▼1.05110.74 ▲7.4942.07 ▼0.21
Posts /wp-admin/edit.php2,094 ▲22.04 ▲0.0540.66 ▼0.8637.06 ▼0.07
Add New Post /wp-admin/post-new.php1,539 ▲623.24 ▲0.32646.28 ▲9.6662.57 ▲4.50
Media Library /wp-admin/upload.php1,390 ▲24.19 ▼0.0493.22 ▲0.0942.31 ▲1.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: content in wp-content/plugins/download-html-tinymce-button/download.php on line 11
    • > PHP Notice
      Undefined index: timezone_offset in wp-content/plugins/download-html-tinymce-button/download.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/download-html-tinymce-button/plugin.php:11

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: page, editor, download, html, button...

download-html-tinymce-button/plugin.php 92% from 13 tests

The main PHP file in "Download HTML TinyMCE Button" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("download-html-tinymce-button.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
No dangerous file extensions were detected78 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript112236
PHP291436
CSS1106

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin