72% wp-emoticon-rating

Code Review | WP Emoticon Rating

WordPress plugin WP Emoticon Rating scored72%from 54 tests.

About plugin

  • Plugin page: wp-emoticon-rating
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2016
  • Latest release: Mar 10, 2019
  • Number of updates: 8
  • Update frequency: every 125.8 days
  • Top authors: rahulbhangale (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,044 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.76ms] Passed 4 tests

This is a short check of server-side resources used by WP Emoticon Rating
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.91 ▼0.61
Dashboard /wp-admin3.32 ▲0.0147.19 ▼5.58
Posts /wp-admin/edit.php3.37 ▲0.0149.03 ▼7.25
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.65 ▼17.58
Media Library /wp-admin/upload.php3.24 ▲0.0139.37 ▲5.40
Emoticon Rating /wp-admin/options-general.php?page=emo-settings3.1928.28

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Emoticon Rating
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14713.52 ▼0.8310.00 ▲8.2245.16 ▲1.10
Dashboard /wp-admin2,206 ▲325.69 ▲0.0386.92 ▼16.1442.58 ▲1.89
Posts /wp-admin/edit.php2,111 ▲82.00 ▲0.0139.51 ▼3.7935.08 ▼2.75
Add New Post /wp-admin/post-new.php1,533 ▲723.09 ▼0.07683.40 ▲46.9264.84 ▲14.31
Media Library /wp-admin/upload.php1,408 ▲114.23 ▲0.03111.71 ▼0.8547.00 ▲2.88
Emoticon Rating /wp-admin/options-general.php?page=emo-settings9242.0225.0727.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=emo-settings
    • > Notice in wp-content/plugins/wp-emoticon-rating/admin/wp-emo-admin.php+136
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-emoticon-rating/index.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-emoticon-rating/admin/wp-emo-admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-emoticon-rating/src/wp-emo-display.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-emoticon-rating === )
Please take inspiration from this readme.txt

wp-emoticon-rating/wp-emoticon-rating.php Passed 13 tests

The entry point to "WP Emoticon Rating" version 1.0.1 is a PHP file that has certain tags in its header comment area
43 characters long description:
Allow your users to express their emotions.

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
Good job! No executable or dangerous file extensions detected455 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP45119329
CSS21065
JavaScript26061

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity10.50
▷ Minimum class complexity3.00
▷ Maximum class complexity18.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods111.11%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
11 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/lough.png7.58KB4.26KB▼ 43.84%
images/sad.png8.68KB4.62KB▼ 46.78%
images/smile.png8.71KB4.71KB▼ 45.91%
assets/screenshot-2.png26.31KB11.03KB▼ 58.08%
images/angry.png9.20KB4.77KB▼ 48.12%