83% post-like-dislike

Code Review | Post Like Dislike

WordPress plugin Post Like Dislike scored83%from 54 tests.

About plugin

  • Plugin page: post-like-dislike
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 28, 2013
  • Latest release: Jun 28, 2013
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: CuvixSystem (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /3,725 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.29MB] [CPU: ▼17.05ms] Passed 4 tests

A check of server-side resources used by Post Like Dislike
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0327.44 ▼15.03
Dashboard /wp-admin3.36 ▲0.0551.58 ▼1.77
Posts /wp-admin/edit.php3.41 ▲0.0554.90 ▲8.33
Add New Post /wp-admin/post-new.php4.65 ▼1.2443.97 ▼52.21
Media Library /wp-admin/upload.php3.28 ▲0.0539.80 ▲0.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Post Like Dislike
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.28 ▲0.122.00 ▼0.0441.75 ▼5.40
Dashboard /wp-admin2,211 ▲345.61 ▼0.0482.82 ▼18.2144.32 ▲0.19
Posts /wp-admin/edit.php2,113 ▲131.96 ▼0.0536.58 ▼1.2734.50 ▼0.01
Add New Post /wp-admin/post-new.php1,546 ▲1823.20 ▲0.11674.92 ▲26.8856.78 ▼17.72
Media Library /wp-admin/upload.php1,416 ▲164.22 ▲0.04103.81 ▼6.7445.17 ▼0.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-like-dislike/post-like-dislike.php:15

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 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Frontend sidebar column), #2 (admin widget column)
The official readme.txt is a good inspiration

post-like-dislike/post-like-dislike.php 92% from 13 tests

This is the main PHP file of "Post Like Dislike" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 593 characters long)

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
Good job! No executable or dangerous file extensions detected326 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14919299
CSS13027

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
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.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/like_done.png2.00KB1.46KB▼ 27.13%
img/unlike_done.png2.04KB1.47KB▼ 27.83%
img/like.png2.28KB1.76KB▼ 22.97%
img/unlike.png2.44KB1.82KB▼ 25.46%