84% tinymce-code-button

Code Review | TinyMCE Code Button

WordPress plugin TinyMCE Code Button scored 84% from 54 tests.

About plugin

  • Plugin page: tinymce-code-button
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5
  • WordPress version: 6.3.1
  • First release: Jan 7, 2013
  • Latest release: Jan 7, 2013
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: Potsky (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 2,385 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.92ms] Passed 4 tests

This is a short check of server-side resources used by TinyMCE Code Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.56 ▼1.03
Dashboard /wp-admin3.31 ▲0.0142.87 ▼3.90
Posts /wp-admin/edit.php3.36 ▲0.0046.70 ▼3.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.84 ▼6.84
Media Library /wp-admin/upload.php3.23 ▲0.0032.77 ▲0.75

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for TinyMCE Code Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▲0.341.69 ▼0.2843.68 ▼4.85
Dashboard /wp-admin2,209 ▲214.91 ▼0.00102.75 ▼6.1037.56 ▼9.40
Posts /wp-admin/edit.php2,086 ▼62.03 ▲0.0736.03 ▼5.2131.91 ▼6.65
Add New Post /wp-admin/post-new.php1,537 ▲423.24 ▼0.14660.87 ▲4.7753.87 ▼9.30
Media Library /wp-admin/upload.php1,391 ▲34.18 ▲0.0198.56 ▼2.1442.93 ▼0.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tinymce-code-button/tinymce-code-element.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: rich, tinymce, code, button, editor

tinymce-code-button/tinymce-code-element.php 85% from 13 tests

The main PHP file in "TinyMCE Code Button" ver. 0.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 189 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tinymce-code-button.php" instead of "tinymce-code-element.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin117 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
Bourne Shell121860
JavaScript1171139
PHP162118

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions3
▷ Named functions3100.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
2 PNG files occupy 0.25MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png129.99KB40.79KB▼ 68.62%
screenshot-1.png129.99KB40.79KB▼ 68.62%