10% tinymce-emoticons

Code Review | TinyMCE Emoticons

WordPress plugin TinyMCE Emoticons scored10%from 54 tests.

About plugin

  • Plugin page: tinymce-emoticons
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2014
  • Latest release: Feb 23, 2015
  • Number of updates: 10
  • Update frequency: every 36.8 days
  • Top authors: nazmur.r (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /14,982 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/tinymce-emoticons/tinymce-emoticons.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; TinyMCE_Emoticons has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.98ms] Passed 4 tests

An overview of server-side resources used by TinyMCE Emoticons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.397.92 ▼35.25
Dashboard /wp-admin2.10 ▼1.217.11 ▼42.16
Posts /wp-admin/edit.php2.10 ▼1.266.85 ▼49.55
Add New Post /wp-admin/post-new.php2.10 ▼3.798.45 ▼84.97
Media Library /wp-admin/upload.php2.10 ▼1.134.97 ▼32.49
TinyMCE Emoticons /wp-admin/options-general.php?page=tinyemo_settings2.106.14

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 130 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for TinyMCE Emoticons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.20 ▼1.171.99 ▼0.0640.74 ▼5.61
Dashboard /wp-admin2,207 ▲225.83 ▲0.95120.88 ▲3.0446.89 ▲0.41
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0541.07 ▼13.0644.26 ▲8.84
Add New Post /wp-admin/post-new.php1,364 ▼15516.71 ▼6.52573.63 ▼134.8243.73 ▼19.47
Media Library /wp-admin/upload.php1,395 ▲104.21 ▲0.0097.57 ▼23.2044.15 ▼4.37
TinyMCE Emoticons /wp-admin/options-general.php?page=tinyemo_settings8231.7929.1326.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/tinymce-emoticons/tinymce-emoticons.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; TinyMCE_Emoticons has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=tinyemo_settings
    • > Deprecated in wp-content/plugins/tinymce-emoticons/tinymce-emoticons.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; TinyMCE_Emoticons has a deprecated constructor

SRP 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/tinymce-emoticons/tinymce-emoticons.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=tinyemo_settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/tinymce-emoticons/js/tinymce-emoticons.js?ver=6.3.1 218:57 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (TinyMCE Emoticons settings page), #2 (TinyMCE popup in page add screen)
Please take inspiration from this readme.txt

tinymce-emoticons/tinymce-emoticons.php Passed 13 tests

The main PHP script in "TinyMCE Emoticons" version 1.3 is automatically included on every request by WordPress
44 characters long description:
Easy way to add emoticons in posts and pages

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
No dangerous file extensions were detected785 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS1224448
JavaScript31943228
PHP11916109

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
88 PNG files occupy 0.53MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/emoticons-set-1/drink.png3.80KB0.84KB▼ 78.03%
images/emoticons-set-1/handshake.png3.88KB0.99KB▼ 74.58%
images/emoticons-set-1/note.png3.28KB0.46KB▼ 85.86%
images/emoticons-set-1/sun.png4.22KB1.35KB▼ 67.95%
images/emoticons-set-1/thinking.png4.31KB1.20KB▼ 72.08%