94% reward-for-comment

Code Review | Reward for Comment

WordPress plugin Reward for Comment scored 94% from 54 tests.

About plugin

  • Plugin page: reward-for-comment
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-5.5
  • WordPress version: 5.8.1
  • First release: Jul 28, 2020
  • Latest release: Sep 9, 2020
  • Number of updates: 5
  • Update frequency: every 8.6 days
  • Top authors: trof (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 259 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼139.97ms] 75% from 4 tests

An overview of server-side resources used by Reward for Comment
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 3,138.93ms on /wp-admin/options-general.php?page=reward-for-comment)
PageMemory (MB)CPU Time (ms)
Home /3.04 ▲0.3236.20 ▲13.57
Dashboard /wp-admin3.27 ▲0.2147.06 ▲1.19
Posts /wp-admin/edit.php3.38 ▲0.2746.53 ▲12.19
Add New Post /wp-admin/post-new.php5.62 ▲0.1990.23 ▼569.58
Media Library /wp-admin/upload.php3.21 ▲0.2131.87 ▼3.69
Reward for Comment /wp-admin/options-general.php?page=reward-for-comment3.193,138.93

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reward for Comment
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,932 ▲33616.63 ▲1.1223.61 ▲14.34110.79 ▲61.77
Dashboard /wp-admin3,083 ▲1496.32 ▲0.37138.76 ▼4.83183.89 ▲76.49
Posts /wp-admin/edit.php2,827 ▲882.58 ▼0.1470.97 ▲6.24135.94 ▲43.72
Add New Post /wp-admin/post-new.php1,705 ▲3317.33 ▼1.53354.11 ▼33.42199.80 ▲90.87
Media Library /wp-admin/upload.php1,892 ▲825.19 ▲0.16145.64 ▲3.40180.18 ▲63.42
Reward for Comment /wp-admin/options-general.php?page=reward-for-comment2,4932.8877.75112.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/reward-for-comment/reward-for-comment.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (**Comments** - Front-end, Administrator view), #2 (**Comment** - Commenter view, comment is rewarded), #3 (**Comment** - Other user view), #4 (**Comment** - Guest view), #5 (**Comment** - Administrator view), #6 (**Comments** - Back-end), #7 (**Crypto-currency settings** - Admin interface), #8 (**Other settings** - Admin interface)
The official readme.txt might help

reward-for-comment/reward-for-comment.php Passed 13 tests

The entry point to "Reward for Comment" version 1.0.0 is a PHP file that has certain tags in its header comment area
57 characters long description:
Reward users for creating unique content for your website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,620 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP19739754
SVG100288
PO File1100105250
JavaScript22516195
CSS2198133

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
9 PNG files occupy 0.36MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png37.84KB16.89KB▼ 55.36%
screenshot-8.png27.42KB17.52KB▼ 36.12%
screenshot-3.png45.94KB20.12KB▼ 56.21%
screenshot-4.png59.16KB26.75KB▼ 54.78%
screenshot-5.png31.70KB11.91KB▼ 62.44%