90% sr-post-like-dislike

Code Review | SR Post Like Dislike

WordPress plugin SR Post Like Dislike scored90%from 54 tests.

About plugin

  • Plugin page: sr-post-like-dislike
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2023
  • Latest release: Jan 27, 2023
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: superrishi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /673 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.22ms] Passed 4 tests

This is a short check of server-side resources used by SR Post Like Dislike
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.12 ▼0.10
Dashboard /wp-admin3.37 ▲0.0243.10 ▼16.38
Posts /wp-admin/edit.php3.48 ▲0.1346.45 ▲1.99
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.43 ▼1.08
Media Library /wp-admin/upload.php3.29 ▲0.0634.15 ▲0.68

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

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

Browser metrics Passed 4 tests

SR Post Like Dislike: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18713.65 ▼0.725.22 ▲3.5440.56 ▲0.87
Dashboard /wp-admin2,206 ▲175.86 ▲0.92111.40 ▼1.1543.28 ▲1.16
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0339.43 ▲3.5234.72 ▼1.28
Add New Post /wp-admin/post-new.php1,533 ▲1423.07 ▼0.24626.07 ▼12.9479.41 ▲18.32
Media Library /wp-admin/upload.php1,388 ▼34.22 ▼0.0194.77 ▼9.9539.34 ▼8.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: like and dislike, post likes, like dislike, product likes

sr-post-like-dislike/sr-post-like-dislike.php Passed 13 tests

"SR Post Like Dislike" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
A plugin to add like and dislike functionality to posts,pages, and custom post types.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin381 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13417277
JavaScript12053
CSS110051

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity21.00
▷ Minimum class complexity10.00
▷ Maximum class complexity32.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.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
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
assets/img/like.png3.35KB1.57KB▼ 52.98%
assets/img/like-solid.png3.26KB0.67KB▼ 79.55%
assets/img/like-bordered.png0.93KB0.90KB▼ 4.08%
assets/img/dislike.png2.29KB1.33KB▼ 42.11%