83% emoji-in-comments

Code Review | Emoji in comments

WordPress plugin Emoji in comments scored83%from 54 tests.

About plugin

  • Plugin page: emoji-in-comments
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 28, 2019
  • Latest release: Sep 28, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: hanhdo205 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,106 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 successfully, without throwing any errors or notices

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

Server-side resources used by Emoji in comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.86 ▲0.15
Dashboard /wp-admin3.31 ▼0.0345.59 ▼14.31
Posts /wp-admin/edit.php3.36 ▲0.0146.04 ▲0.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.38 ▼20.06
Media Library /wp-admin/upload.php3.24 ▲0.0133.47 ▼0.94

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Emoji in comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17315.27 ▲1.1320.55 ▲18.4943.08 ▲1.45
Dashboard /wp-admin2,203 ▲125.82 ▲0.9396.52 ▼3.7937.56 ▼5.15
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0340.40 ▲5.0434.13 ▼1.12
Add New Post /wp-admin/post-new.php1,514 ▼1417.81 ▼0.55696.18 ▲76.7358.19 ▲1.64
Media Library /wp-admin/upload.php1,388 ▲94.16 ▼0.0297.73 ▼4.2639.77 ▼5.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emoji-in-comments/comment-emoji.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

emoji-in-comments/comment-emoji.php 92% from 13 tests

The main file in "Emoji in comments" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("emoji-in-comments.php" instead of "comment-emoji.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin93 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript357371
PHP15819
CSS3003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.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

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 3.07MB with 2.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/emoji_spritesheet_4.png531.48KB142.71KB▼ 73.15%
images/emoji_spritesheet_1.png530.83KB127.64KB▼ 75.95%
images/emoji_spritesheet_2.png956.04KB261.46KB▼ 72.65%
images/emoji_spritesheet_3.png402.21KB109.53KB▼ 72.77%
images/emoji_spritesheet_0.png722.33KB170.15KB▼ 76.44%