84% native-emoji

Code Review | Native Emoji

WordPress plugin Native Emoji scored84%from 54 tests.

About plugin

  • Plugin page: native-emoji
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 4, 2015
  • Latest release: Jun 25, 2018
  • Number of updates: 67
  • Update frequency: every 16.3 days
  • Top authors: Davabuu (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

8,000+ active /57,489 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.87ms] Passed 4 tests

Analyzing server-side resources used by Native Emoji
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0946.20 ▲1.11
Dashboard /wp-admin3.39 ▲0.0948.86 ▼3.00
Posts /wp-admin/edit.php3.44 ▲0.0848.48 ▼4.01
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.23 ▼21.56
Media Library /wp-admin/upload.php3.32 ▲0.0841.80 ▲5.78
Native Emoji /wp-admin/options-general.php?page=nep_native_emoji3.3337.61

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: 1 new table, 6 new options
New tables
wp_nep_native_emoji
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Native Emoji
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.67 ▼0.911.79 ▼0.1743.27 ▲1.07
Dashboard /wp-admin2,204 ▲164.85 ▼0.03107.56 ▲4.9642.07 ▼2.12
Posts /wp-admin/edit.php2,096 ▲72.02 ▼0.0134.70 ▼7.4835.29 ▲1.85
Add New Post /wp-admin/post-new.php1,536 ▲2223.03 ▲5.52641.36 ▼65.5754.13 ▲4.51
Media Library /wp-admin/upload.php1,395 ▲74.31 ▼0.1094.54 ▼6.6944.17 ▼3.27
Native Emoji /wp-admin/options-general.php?page=nep_native_emoji1,0192.0724.5530.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/native-emoji/options-page.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/native-emoji/native-emoji.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: emoji comments, icons, emoji, editor, emoticons...

native-emoji/native-emoji.php 92% from 13 tests

The main PHP file in "Native Emoji" ver. 3.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 275 characters long)

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
There were no executable files found in this plugin10,943 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2115425,296
CSS2138285,263
PHP55658384

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 1.62MB with 1.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/nep_sprite.png14.79KB5.71KB▼ 61.39%
img/emoji_sprite.png1,648.60KB330.13KB▼ 79.97%