10% locco-emoticons

Code Review | Locco Emoticons

WordPress plugin Locco Emoticons scored10%from 54 tests.

About plugin

  • Plugin page: locco-emoticons
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Jan 25, 2014
  • Latest release: Nov 2, 2016
  • Number of updates: 43
  • Update frequency: every 23.5 days
  • Top authors: andreisebastian (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,310 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method loccoEmoticons::activate() should not be called statically

Server metrics [RAM: ▼0.90MB] [CPU: ▼32.46ms] Passed 4 tests

Analyzing server-side resources used by Locco Emoticons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0333.12 ▼8.90
Dashboard /wp-admin3.04 ▼0.2625.75 ▼20.16
Posts /wp-admin/edit.php3.04 ▼0.3127.21 ▼23.76
Add New Post /wp-admin/post-new.php3.04 ▼2.8425.10 ▼75.28
Media Library /wp-admin/upload.php3.04 ▼0.1828.34 ▼10.64
Locco Emoticons /wp-admin/options-general.php?page=loccoEmoticons3.0523.46

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Locco Emoticons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.72 ▲0.461.78 ▲0.1843.05 ▼0.37
Dashboard /wp-admin2,202 ▲255.58 ▼0.0591.57 ▲4.1837.04 ▼3.29
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0040.43 ▲1.3938.92 ▲4.40
Add New Post /wp-admin/post-new.php1,529 ▲323.60 ▲0.44692.74 ▼21.2059.93 ▲6.21
Media Library /wp-admin/upload.php1,401 ▲44.14 ▼0.28107.78 ▼2.9446.61 ▲1.48
Locco Emoticons /wp-admin/options-general.php?page=loccoEmoticons1,5571.9029.8775.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method loccoEmoticons::menu() should not be called statically
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • Locco_Ro_emoticons
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=loccoEmoticons
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method loccoEmoticons::menu() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=loccoEmoticons
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=loccoEmoticons
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method loccoEmoticons::control() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=loccoEmoticons
    • > Notice in wp-content/plugins/locco-emoticons/emoticons.php+73
    Undefined index: Locco_Ro_emoticons_action

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
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/locco-emoticons/emoticons-list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/locco-emoticons/emoticons-list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/locco-emoticons/emoticons-list.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: smileys, smiley, smilies, emoticon, comment...

locco-emoticons/emoticons.php 92% from 13 tests

The main file in "Locco Emoticons" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("locco-emoticons.php" instead of "emoticons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin310 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32632310

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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 Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin