84% comments-reactions

Code Review | Comments Reactions

WordPress plugin Comments Reactions scored84%from 54 tests.

About plugin

  • Plugin page: comments-reactions
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-5.0
  • WordPress version: 6.3.1
  • First release: Mar 20, 2018
  • Latest release: Oct 27, 2018
  • Number of updates: 4
  • Update frequency: every 55.0 days
  • Top authors: HenriqueSilverio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,371 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by Comments Reactions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.02 ▼3.48
Dashboard /wp-admin3.31 ▲0.0144.22 ▼3.96
Posts /wp-admin/edit.php3.36 ▲0.0146.05 ▲1.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.82 ▼15.38
Media Library /wp-admin/upload.php3.24 ▲0.0136.50 ▲1.26

Server storage [IO: ▲0.26MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Comments Reactions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.59 ▼1.035.47 ▲3.8839.67 ▲1.49
Dashboard /wp-admin2,206 ▲145.83 ▲0.85101.66 ▼10.8537.78 ▼3.71
Posts /wp-admin/edit.php2,086 ▲182.03 ▲0.0135.98 ▲2.8233.11 ▲0.21
Add New Post /wp-admin/post-new.php1,533 ▲1423.01 ▼0.06669.93 ▼16.6357.92 ▼2.12
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0394.45 ▼1.6742.90 ▼3.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/comments-reactions/templates/reactions.php:37
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/comments-reactions/templates/reactions.php on line 8
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/comments-reactions/templates/reactions.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/comments-reactions/templates/reactions.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/comments-reactions/templates/reactions.php on line 6
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/comments-reactions/templates/reactions.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/comments-reactions/templates/reactions.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: comments, rating, emoji, reactions, facebook reactions...

comments-reactions/comments-reactions.php 85% from 13 tests

The main PHP file in "Comments Reactions" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

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
Good job! No executable or dangerous file extensions detected3,371 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JSON3001,753
PHP17185334796
JavaScript28472346
Sass85914311
SVG606118
PO File171535
Markdown110011
CSS1061

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.38
Average class complexity8.40
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods43
▷ Static methods49.30%
▷ Public methods4093.02%
▷ Protected methods24.65%
▷ Private methods12.33%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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