93% like-dislike-voting

Code Review | Like DisLike Voting

WordPress plugin Like DisLike Voting scored 93% from 54 tests.

About plugin

  • Plugin page: like-dislike-voting
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4
  • WordPress version: 5.8.1
  • First release: Dec 23, 2015
  • Latest release: Jan 16, 2016
  • Number of updates: 22
  • Update frequency: every 1.1 days
  • Top authors: Wasiul99 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active / 3,292 total downloads

Benchmarks

Plugin footprint Passed 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.17MB] [CPU: ▼158.35ms] Passed 4 tests

Server-side resources used by Like DisLike Voting
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.0424.27 ▼8.89
Dashboard /wp-admin3.11 ▲0.0644.22 ▲0.16
Posts /wp-admin/edit.php3.16 ▲0.0644.34 ▼2.75
Add New Post /wp-admin/post-new.php4.70 ▼0.7357.82 ▼617.60
Media Library /wp-admin/upload.php3.05 ▲0.0533.43 ▼4.15

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Like DisLike Voting
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,721 ▲12515.94 ▼0.019.50 ▼0.2248.01 ▼3.72
Dashboard /wp-admin2,987 ▲536.05 ▲0.06131.91 ▼10.16112.33 ▼2.63
Posts /wp-admin/edit.php2,759 ▲202.72 ▲0.0269.49 ▲0.8587.87 ▼4.29
Add New Post /wp-admin/post-new.php1,685 ▼18719.09 ▼0.12385.00 ▲7.05107.51 ▲1.30
Media Library /wp-admin/upload.php1,830 ▲235.03 ▲0.01143.75 ▼4.40123.77 ▲2.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/like-dislike-voting/files/like.php:112
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/like-dislike-voting/files/options.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/like-dislike-voting/files/function.php:118
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/like-dislike-voting/files/session.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/like-dislike-voting/files/session.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Frontend sidebar column), #2 (admin widget column), #3 (Pro screenshot)
  • Tags: There are too many tags (16 tag instead of maximum 10)
Please take inspiration from this readme.txt

like-dislike-voting/index.php 85% from 13 tests

The main file in "Like DisLike Voting" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("like-dislike-voting.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 243 characters long)

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
Everything looks great! No dangerous files found in this plugin337 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP55416308
CSS19029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
4 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/unlike.png34.38KB8.31KB▼ 75.83%
img/like.png19.08KB7.49KB▼ 60.73%
img/unlike_done.png34.38KB8.31KB▼ 75.83%
img/like_done.png19.08KB7.49KB▼ 60.73%