10% lm-easy-emoticons

Code Review | LM-Easy-Emoticons

WordPress plugin LM-Easy-Emoticons scored10%from 54 tests.

About plugin

  • Plugin page: lm-easy-emoticons
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Oct 21, 2014
  • Number of updates: 6
  • Update frequency: every 4.8 days
  • Top authors: lamb-mei (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,854 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/lm-easy-emoticons/lm-easy-emoticons.php+33
    Methods with the same name as their class will not be constructors in a future version of PHP; LMEasy_Emoticons has a deprecated constructor

Server metrics [RAM: ▼1.80MB] [CPU: ▼53.37ms] Passed 4 tests

A check of server-side resources used by LM-Easy-Emoticons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.49 ▼35.61
Dashboard /wp-admin2.20 ▼1.107.16 ▼41.72
Posts /wp-admin/edit.php2.20 ▼1.155.86 ▼39.99
Add New Post /wp-admin/post-new.php2.20 ▼3.685.90 ▼96.17
Media Library /wp-admin/upload.php2.20 ▼1.035.72 ▼28.04

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for LM-Easy-Emoticons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.19 ▼0.201.71 ▲0.1044.40 ▲4.15
Dashboard /wp-admin2,195 ▲185.61 ▲0.0894.95 ▲9.7242.87 ▼0.03
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0733.88 ▼1.2835.72 ▲3.46
Add New Post /wp-admin/post-new.php1,636 ▲11023.58 ▼0.05689.41 ▲18.0059.47 ▼20.16
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.0093.94 ▼6.0542.14 ▼5.98

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/lm-easy-emoticons/lm-easy-emoticons.php+33
    Methods with the same name as their class will not be constructors in a future version of PHP; LMEasy_Emoticons has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/lm-easy-emoticons/lm-easy-emoticons.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (LM-Easy-Emoticons button on post editor.), #2 (You will see empty emoticon), #3 (You can add emoticon for URL or File)
The official readme.txt might help

lm-easy-emoticons/lm-easy-emoticons.php Passed 13 tests

The main PHP script in "LM-Easy-Emoticons" version 1.0 is automatically included on every request by WordPress
25 characters long description:
Easy way to use Emoticons

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
Everything looks great! No dangerous files found in this plugin1,037 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript214367403
PHP1220172380
CSS1645254

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 0.06MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/close.png0.95KB0.11KB▼ 88.91%
css/images/add_btn.png21.08KB1.47KB▼ 93.04%
css/images/clear_btn.png2.48KB1.26KB▼ 49.41%
css/images/bg1.png0.95KB0.13KB▼ 85.88%
css/images/bg2.png0.97KB0.22KB▼ 77.44%