10% emoji-reactions

Code Review | Emoji Reactions

WordPress plugin Emoji Reactions scored10%from 54 tests.

About plugin

  • Plugin page: emoji-reactions
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.3
  • WordPress version: 6.3.1
  • First release: Sep 19, 2015
  • Latest release: Sep 20, 2015
  • Number of updates: 15
  • Update frequency: every 0.2 days
  • Top authors: stuartquin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /3,638 total downloads

Benchmarks

Plugin footprint 23% 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
    • > Warning in wp-content/plugins/emoji-reactions/emoji-emotions.php+220
    Use of undefined constant emojiemo_shortcode_render - assumed 'emojiemo_shortcode_render' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.03MB] [CPU: ▼52.29ms] Passed 4 tests

Analyzing server-side resources used by Emoji Reactions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.95 ▼0.516.84 ▼32.64
Dashboard /wp-admin2.97 ▼0.338.44 ▼39.31
Posts /wp-admin/edit.php2.97 ▼0.3810.23 ▼39.20
Add New Post /wp-admin/post-new.php2.97 ▼2.917.29 ▼98.02
Media Library /wp-admin/upload.php2.97 ▼0.259.34 ▼25.78

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 23 new files
Database: 1 new table, 6 new options
New tables
wp_emojiemo_emojis
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Emoji Reactions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13413.61 ▼0.757.54 ▲5.5640.48 ▼7.06
Dashboard /wp-admin2,215 ▲244.87 ▼0.03101.08 ▼1.7739.75 ▼0.94
Posts /wp-admin/edit.php2,098 ▲92.02 ▼0.0138.90 ▼4.2233.67 ▼2.02
Add New Post /wp-admin/post-new.php1,524 ▼2023.21 ▲4.86664.19 ▲55.1566.75 ▲15.03
Media Library /wp-admin/upload.php1,394 ▲64.29 ▲0.1196.33 ▲1.4144.28 ▲2.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/emoji-reactions/emoji-emotions.php+220
    Use of undefined constant emojiemo_shortcode_render - assumed 'emojiemo_shortcode_render' (this will throw an Error in a future version of PHP)
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_emojiemo_emojis
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/emoji-reactions/emoji-emotions.php:218
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/emoji-reactions/emojione/test/EmojioneTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Emojione\\ClientInterface' not found in wp-content/plugins/emoji-reactions/emojione/src/Client.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/emoji-reactions/emojione/test/ConversionTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/emoji-reactions/emojione/test/EmojiTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/emoji-reactions/emojione/test/SpriteTest.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Emojione\\RulesetInterface' not found in wp-content/plugins/emoji-reactions/emojione/src/Ruleset.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #0, #0 in emoji-reactions/assets to your readme.txt
  • Screenshots: Screenshot #1 (Click Emoji to share reaction) image required
You can take inspiration from this readme.txt

emoji-reactions/emoji-emotions.php 92% from 13 tests

The main PHP script in "Emoji Reactions" version 0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("emoji-reactions.php" instead of "emoji-emotions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin6,357 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP122641,8863,607
CSS21,28302,614
JavaScript1180123
XML11013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity6.44
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces2
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods72
▷ Static methods56.94%
▷ Public methods6894.44%
▷ Protected methods45.56%
▷ Private methods00.00%
Functions18
▷ Named functions18100.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

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 2.42MB with 1.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/add_hover.png3.62KB2.13KB▼ 41.09%
static/emojione.sprites.png2,335.13KB1,020.65KB▼ 56.29%
screenshot-1.png98.46KB32.85KB▼ 66.63%
static/add.png3.28KB2.12KB▼ 35.43%
screenshot-2.png41.27KB16.80KB▼ 59.29%