78% 5-emotions

Code Review | 5 Emotions

WordPress plugin 5 Emotions scored78%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: 6.3.1
  • 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 /576 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.03MB] [CPU: ▼5.44ms] Passed 4 tests

Analyzing server-side resources used by 5 Emotions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.37 ▼6.38
Dashboard /wp-admin3.34 ▲0.0441.80 ▼7.71
Posts /wp-admin/edit.php3.46 ▲0.1048.02 ▲0.02
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.67 ▼7.68
Media Library /wp-admin/upload.php3.27 ▲0.0334.80 ▲0.41
5 Emotions /wp-admin/options-general.php?page=five-emo-wp3.2327.86

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_fiveemo_wp_widget
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for 5 Emotions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲18513.61 ▼0.848.45 ▲6.6636.37 ▼7.22
Dashboard /wp-admin2,217 ▲264.88 ▼1.16112.06 ▲8.7141.89 ▼3.92
Posts /wp-admin/edit.php2,100 ▲112.03 ▼0.0139.72 ▲3.6735.35 ▲2.56
Add New Post /wp-admin/post-new.php1,544 ▲3018.10 ▲0.58613.39 ▼65.9763.56 ▲5.37
Media Library /wp-admin/upload.php1,390 ▼14.26 ▲0.0597.70 ▼3.4042.36 ▼3.32
5 Emotions /wp-admin/options-general.php?page=five-emo-wp8618.16131.7335.04

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_fiveemo_wp_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/5-emotions/includes/five-emo-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/5-emotions/admin/five-emo-wp-admin.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > 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 [Sat, 07 Oct 2023 05:54:04 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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

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

The main PHP file in "5 Emotions" ver. 1.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("5-emotions.php" instead of "five-emo-wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous 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
There are no cyclomatic complexity problems detected for this plugin
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

All PNG images should be compressed to minimize bandwidth usage for end users
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/banner-772x250.png21.33KB7.99KB▼ 62.57%
assets/icon-256x256.png11.35KB4.76KB▼ 58.11%