74% super-reactions

Code Review | Super Reactions

WordPress plugin Super Reactions scored74%from 54 tests.

About plugin

  • Plugin page: super-reactions
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.6
  • WordPress version: 6.3.1
  • First release: Jan 8, 2021
  • Latest release: Mar 13, 2021
  • Number of updates: 12
  • Update frequency: every 5.6 days
  • Top authors: h71 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /628 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.59ms] Passed 4 tests

Server-side resources used by Super Reactions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1235.66 ▼2.16
Dashboard /wp-admin3.51 ▲0.2056.33 ▲10.82
Posts /wp-admin/edit.php3.56 ▲0.2046.55 ▼5.75
Add New Post /wp-admin/post-new.php6.05 ▲0.1683.98 ▼19.12
Media Library /wp-admin/upload.php3.37 ▲0.1435.56 ▲0.67

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 45 new files
Database: 1 new table, 6 new options
New tables
wp_super_reactions
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Super Reactions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲12613.40 ▼0.957.74 ▲5.5736.31 ▼3.22
Dashboard /wp-admin2,210 ▲335.65 ▲0.0785.08 ▼8.2036.81 ▼0.49
Posts /wp-admin/edit.php2,109 ▲91.98 ▼0.0334.05 ▼2.6831.19 ▼5.49
Add New Post /wp-admin/post-new.php1,536 ▲1923.27 ▲4.33609.22 ▲171.4771.04 ▲1.66
Media Library /wp-admin/upload.php1,415 ▲154.23 ▲0.0197.87 ▼3.8941.54 ▲0.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_super_reactions
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SREA\\plugin_dir_path() in wp-content/plugins/super-reactions/constants.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SREA\\plugin_dir_path() in wp-content/plugins/super-reactions/constants.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-reactions/admin/ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-reactions/includes/hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-reactions/includes/ajax.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
2 plugin tags: like, reaction

super-reactions/super-reactions.php Passed 13 tests

"Super Reactions" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
36 characters long description:
Get meaningful reactions from users.

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 detected1,866 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP313931701,287
CSS4590348
JavaScript4170226
JSON1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods87
▷ Static methods2124.14%
▷ Public methods6878.16%
▷ Protected methods00.00%
▷ Private methods1921.84%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
front/assets/img/logo.png3.87KB1.15KB▼ 70.30%