78% 5-emotions

Code Review | 5 Emotions

WordPress plugin 5 Emotions scored 78% from 54 tests.

About plugin

  • Plugin page: 5-emotions
  • Plugin version: 1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.9.2
  • First release: Apr 28, 2021
  • Latest release: Apr 28, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: meyfy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 254 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼297.90ms] Passed 4 tests

Analyzing server-side resources used by 5 Emotions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0654.53 ▼1.68
Dashboard /wp-admin3.45 ▲0.0534.84 ▼1.19
Posts /wp-admin/edit.php3.68 ▲0.0437.16 ▼1.14
Add New Post /wp-admin/post-new.php6.94 ▼0.0592.83 ▼1,187.57
Media Library /wp-admin/upload.php3.33 ▲0.0424.34 ▼0.14
5 Emotions /wp-admin/options-general.php?page=five-emo-wp3.3022.22

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
widget_fiveemo_wp_widget

Browser metrics Passed 4 tests

5 Emotions: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,919 ▲16515.80 ▲0.119.23 ▲2.393.12 ▼0.89
Dashboard /wp-admin2,902 ▲416.21 ▲0.00119.12 ▼16.09153.91 ▼9.78
Posts /wp-admin/edit.php2,698 ▲43.26 ▲0.0366.00 ▲0.75142.60 ▼0.40
Add New Post /wp-admin/post-new.php1,639 ▼5121.36 ▲2.43403.84 ▼1.04147.51 ▼4.15
Media Library /wp-admin/upload.php1,711 ▲165.55 ▲0.03143.70 ▲0.99191.99 ▲1.76
5 Emotions /wp-admin/options-general.php?page=five-emo-wp1,0568.51161.80103.29

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_fiveemo_wp_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/5-emotions/admin/five-emo-wp-admin.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/5-emotions/includes/five-emo-widget.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=five-emo-wp
    • > Console-api (severe) in unknown
    https://www.5emotions.de/main.96e774d3210dcd27.js 0:178082 "MSAL LOGGING: 0 [Wed, 23 Mar 2022 06:28:24 GMT] : @azure/msal-angular@2.1.1 : Error - Guard - error while logging in, unable to activate"

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

5-emotions/five-emo-wp.php 85% from 13 tests

Analyzing the main PHP file in "5 Emotions" version 1.5
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("5-emotions.php" instead of "five-emo-wp.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin165 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP356114141
PO File14024

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.67
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png11.35KB4.76KB▼ 58.11%
assets/banner-772x250.png21.33KB7.99KB▼ 62.57%