83% post-likedislike

Code Review | Post Like/Dislike

WordPress plugin Post Like/Dislike scored83%from 54 tests.

About plugin

  • Plugin page: post-likedislike
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 15, 2018
  • Latest release: Nov 16, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: wp9579 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,039 total downloads

Benchmarks

Plugin footprint 83% 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.02MB] [CPU: ▼4.26ms] Passed 4 tests

Server-side resources used by Post Like/Dislike
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1434.40 ▼6.90
Dashboard /wp-admin3.32 ▲0.0244.28 ▼5.09
Posts /wp-admin/edit.php3.37 ▲0.0143.65 ▼0.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.16 ▼4.96
Media Library /wp-admin/upload.php3.24 ▲0.0135.57 ▲2.57

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Like/Dislike
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8014.34 ▼0.001.62 ▼0.1243.33 ▼2.07
Dashboard /wp-admin2,210 ▲365.61 ▲0.0883.30 ▼29.6941.87 ▼6.18
Posts /wp-admin/edit.php2,115 ▲151.97 ▼0.0634.29 ▼2.7532.83 ▼3.67
Add New Post /wp-admin/post-new.php1,402 ▼12420.55 ▼2.99615.74 ▼76.0367.06 ▲5.82
Media Library /wp-admin/upload.php1,412 ▲124.20 ▲0.0193.18 ▼12.0440.46 ▼4.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-likedislike/inc/like_dislike_btn.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-likedislike/inc/settings.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/post-likedislike/inc/db.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% 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 to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3 in post-likedislike/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === post-likedislike === )
You can take inspiration from this readme.txt

post-likedislike/wordpress-like-dislike.php 77% from 13 tests

Analyzing the main PHP file in "Post Like/Dislike" version 1.0.0
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("post-likedislike.php" instead of "wordpress-like-dislike.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin924 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS53445664
PHP48285237
JavaScript43723

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin