78% otw-tinymce-widget

Code Review | OTW TinyMCE Widget

WordPress plugin OTW TinyMCE Widget scored78%from 54 tests.

About plugin

  • Plugin page: otw-tinymce-widget
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Jun 7, 2014
  • Latest release: May 6, 2022
  • Number of updates: 17
  • Update frequency: every 170.1 days
  • Top authors: OTWthemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,667 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by OTW TinyMCE Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1444.55 ▲3.59
Dashboard /wp-admin3.45 ▲0.1054.49 ▼7.90
Posts /wp-admin/edit.php3.52 ▲0.1652.66 ▲1.89
Add New Post /wp-admin/post-new.php5.57 ▼0.3181.39 ▼17.73
Media Library /wp-admin/upload.php3.35 ▲0.1239.24 ▲6.15

Server storage [IO: ▲0.79MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 106 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_otw_shortcode_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

OTW TinyMCE Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,095 ▲34918.36 ▲4.042.74 ▲0.9443.50 ▼2.96
Dashboard /wp-admin2,486 ▲2858.46 ▲3.49174.73 ▲65.0675.78 ▲33.13
Posts /wp-admin/edit.php2,536 ▲4366.02 ▲3.98122.96 ▲85.3137.99 ▲2.16
Add New Post /wp-admin/post-new.php6,563 ▲5,03228.69 ▲5.501,086.69 ▲432.4142.62 ▼14.63
Media Library /wp-admin/upload.php1,828 ▲4287.61 ▲3.37170.75 ▲61.6089.11 ▲41.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_otw_shortcode_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/otw-tinymce-widget/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-mailhide.php
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/otw-tinymce-widget/include/otw_mcsw_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/otw-tinymce-widget/include/otw_components/otw_shortcode/otw_shortcode.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/otw-tinymce-widget/include/otw_components/otw_validator/otw_validator.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/otw-tinymce-widget/include/otw_labels/otw_mcsw_shortcode_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/otw-tinymce-widget/include/otw_components/otw_form/otw_form.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/otw-tinymce-widget/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-captcha.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/otw-tinymce-widget/otw_content_manager.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/otw-tinymce-widget/include/otw_components/otw_shortcode/widgets/otw_shortcode_widget.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_esc_text() in wp-content/plugins/otw-tinymce-widget/include/otw_mcsw_help.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Shortcodes' not found in wp-content/plugins/otw-tinymce-widget/include/otw_components/otw_shortcode/shortcodes/otw_shortcode_html_editor.class.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (OTW Shortcode Widget), #2 (TinyMCE Options)
Please take inspiration from this readme.txt

otw-tinymce-widget/otw_content_manager.php 92% from 13 tests

The primary PHP file in "OTW TinyMCE Widget" version 1.7 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("otw-tinymce-widget.php" instead of "otw_content_manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected10,778 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
CSS124701035,222
PHP211,1409023,753
JavaScript12456701,765
SVG30038

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity61.25
▷ Minimum class complexity1.00
▷ Maximum class complexity173.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods137
▷ Static methods2216.06%
▷ Public methods10475.91%
▷ Protected methods2719.71%
▷ Private methods64.38%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
33 compressed PNG files occupy 0.12MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/otw_components/otw_shortcode/images/diag-background-translucent.png0.08KB0.10KB0.00%
include/otw_components/otw_shortcode/images/pattern-1.png0.08KB0.09KB0.00%
include/otw_components/otw_shortcode/images/gm-delete.png0.31KB0.38KB0.00%
include/otw_components/otw_shortcode/images/blockquote-testimonial.png0.16KB0.20KB0.00%
include/otw_components/otw_shortcode/images/read-more.png0.17KB0.22KB0.00%