74% reaction

Code Review | Reaction

WordPress plugin Reaction scored74%from 54 tests.

About plugin

  • Plugin page: reaction
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Jul 19, 2023
  • Latest release: Jul 19, 2023
  • Number of updates: 3
  • Update frequency: every 20.0 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /86 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▲7.29ms] Passed 4 tests

A check of server-side resources used by Reaction
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4349.28 ▲10.60
Dashboard /wp-admin3.59 ▲0.2951.34 ▲1.92
Posts /wp-admin/edit.php3.64 ▲0.2956.51 ▲11.20
Add New Post /wp-admin/post-new.php6.17 ▲0.29112.14 ▲8.60
Media Library /wp-admin/upload.php3.45 ▲0.2343.69 ▲8.02

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 31 new files
Database: 3 new tables, 6 new options
New tables
wp_reactions_to_comments
wp_reactions_to_terms
wp_reactions_to_posts
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Reaction
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲7014.47 ▲0.091.97 ▲0.3141.07 ▼1.62
Dashboard /wp-admin2,203 ▲125.02 ▲0.15112.60 ▲13.0742.94 ▲2.90
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0040.05 ▲3.0933.98 ▼5.27
Add New Post /wp-admin/post-new.php1,533 ▼023.42 ▲0.27660.12 ▲11.7553.77 ▼1.95
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.1093.93 ▼11.5243.50 ▼7.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_reactions_to_comments
    • wp_reactions_to_terms
    • wp_reactions_to_posts
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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 | 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
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Reaction\\Components\\Database' not found in wp-content/plugins/reaction/classes/Source/PostReactionsDatabase.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Palasthotel\\WordPress\\Reaction\\Components\\plugin_dir_path() in wp-content/plugins/reaction/classes/Components/Plugin.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Reaction\\Components\\Component' not found in wp-content/plugins/reaction/classes/Ajax.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Reaction\\Components\\Component' not found in wp-content/plugins/reaction/classes/REST.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Reaction\\Components\\Component' not found in wp-content/plugins/reaction/classes/Assets.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Reaction\\Components\\Database' not found in wp-content/plugins/reaction/classes/Source/TermReactionsDatabase.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\Reaction\\Components\\Database' not found in wp-content/plugins/reaction/classes/Source/CommentReactionsDatabase.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
3 plugin tags: like, dislike, reaction

reaction/reaction.php 85% from 13 tests

The main file in "Reaction" v. 0.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "4.0")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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 detected1,546 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP273565431,540
JSON1005
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.40
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes20
▷ Abstract classes315.00%
▷ Concrete classes1785.00%
▷ Final classes00.00%
Methods107
▷ Static methods2422.43%
▷ Public methods9790.65%
▷ Protected methods00.00%
▷ Private methods109.35%
Functions32
▷ Named functions515.62%
▷ Anonymous functions2784.38%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin