94% tinymce-smiley-button

Code Review | TinyMCE Smiley Button

WordPress plugin TinyMCE Smiley Button scored 94% from 54 tests.

About plugin

  • Plugin page: tinymce-smiley-bu...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.5.1
  • WordPress version: 5.8.1
  • First release: May 9, 2015
  • Latest release: Sep 7, 2020
  • Number of updates: 34
  • Update frequency: every 57.3 days
  • Top authors: Cople (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 15,703 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by TinyMCE Smiley Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0229.77 ▲2.21
Dashboard /wp-admin3.07 ▲0.0143.21 ▼2.72
Posts /wp-admin/edit.php3.12 ▲0.0145.28 ▲2.68
Add New Post /wp-admin/post-new.php5.43 ▼0.0188.53 ▼550.50
Media Library /wp-admin/upload.php3.01 ▲0.0131.99 ▼2.21

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

TinyMCE Smiley Button: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲11115.86 ▲0.209.01 ▲0.8248.30 ▲4.98
Dashboard /wp-admin2,972 ▲415.92 ▼0.08133.39 ▼30.31112.25 ▼0.74
Posts /wp-admin/edit.php2,741 ▲52.72 ▼0.0066.82 ▲4.0894.47 ▼1.41
Add New Post /wp-admin/post-new.php1,620 ▼5621.78 ▲2.92281.23 ▼101.9997.68 ▼7.32
Media Library /wp-admin/upload.php1,809 ▼15.04 ▲0.00139.71 ▼6.90119.78 ▲3.10

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tinymce-smiley-button/tinymce-smiley-button.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (The WordPress editor after installing this plugin.)
You can take inspiration from this readme.txt

tinymce-smiley-button/tinymce-smiley-button.php Passed 13 tests

"TinyMCE Smiley Button" version 1.0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
29 characters long description:
Add Smiley Button to TinyMCE.

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 detected109 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript116154
PHP16831
CSS13024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.46KB11.43KB▼ 51.26%