84% dw-reactions

Code Review | DW Reactions

WordPress plugin DW Reactions scored 84% from 54 tests.

About plugin

  • Plugin page: dw-reactions
  • Plugin version: 1.0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 5.9.2
  • First release: Mar 8, 2016
  • Latest release: Apr 27, 2016
  • Number of updates: 16
  • Update frequency: every 3.2 days
  • Top authors: designwall (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

1,000+ active / 29,121 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼296.50ms] Passed 4 tests

A check of server-side resources used by DW Reactions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1652.59 ▲2.88
Dashboard /wp-admin3.54 ▲0.1034.16 ▼1.60
Posts /wp-admin/edit.php3.76 ▲0.0939.85 ▲1.35
Add New Post /wp-admin/post-new.php7.00 ▼0.0093.43 ▼1,185.65
Media Library /wp-admin/upload.php3.41 ▲0.0925.24 ▼0.08
Reactions /wp-admin/options-general.php?page=dw_reaction_settings3.3824.16

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 1 new option
New WordPress options
dw_reactions

Browser metrics Passed 4 tests

An overview of browser requirements for DW Reactions
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,880 ▲13616.61 ▲0.549.65 ▲3.442.15 ▼0.15
Dashboard /wp-admin2,897 ▲466.01 ▼0.16123.98 ▼15.96156.18 ▼3.92
Posts /wp-admin/edit.php2,690 ▲23.24 ▼0.0163.83 ▼1.60133.87 ▼9.71
Add New Post /wp-admin/post-new.php1,720 ▼4021.15 ▼1.50432.40 ▲3.87156.59 ▼3.71
Media Library /wp-admin/upload.php1,700 ▼15.48 ▲0.04145.72 ▼2.13193.85 ▼0.54
Reactions /wp-admin/options-general.php?page=dw_reaction_settings1,2442.5454.73135.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • dw_reactions

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dw-reactions/dw-reactions.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: like, votes, facebook, reaction, reactions...

dw-reactions/dw-reactions.php 92% from 13 tests

The main PHP file in "DW Reactions" ver. 1.0.1.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin685 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP176132339
CSS1460238
JavaScript213293
Markdown19015

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity83.00
▷ Minimum class complexity83.00
▷ Maximum class complexity83.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/sad.png1.18KB1.21KB0.00%
assets/img/angry.png0.78KB0.81KB0.00%
assets/img/wow.png1.03KB1.06KB0.00%
assets/img/like.png0.73KB0.76KB0.00%
assets/img/haha.png0.87KB0.90KB0.00%