80% inprosysmedia-likes-dislikes-post

Code Review | Likes and Dislikes Plugin

WordPress plugin Likes and Dislikes Plugin scored80%from 54 tests.

About plugin

  • Plugin page: inprosysmedia-lik...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 6.3.1
  • First release: Aug 25, 2021
  • Latest release: Aug 25, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: erumfaham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /408 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.03ms] Passed 4 tests

This is a short check of server-side resources used by Likes and Dislikes Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.74 ▲0.32
Dashboard /wp-admin3.32 ▲0.0154.82 ▼0.31
Posts /wp-admin/edit.php3.37 ▲0.0153.11 ▼1.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.84 ▼1.01
Media Library /wp-admin/upload.php3.24 ▲0.0140.45 ▼1.62

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: 1 new table, 6 new options
New tables
wp_inprosys_ef_likes_dislikes
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Likes and Dislikes Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲11413.79 ▼0.839.38 ▲7.7242.60 ▼6.88
Dashboard /wp-admin2,195 ▲155.58 ▼0.26102.47 ▲2.0642.90 ▼2.80
Posts /wp-admin/edit.php2,100 ▼32.14 ▲0.1835.06 ▼5.0133.81 ▼2.89
Add New Post /wp-admin/post-new.php1,536 ▲722.85 ▼0.69713.47 ▲49.0153.58 ▼3.91
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.02106.45 ▼5.0547.17 ▲1.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/inprosysmedia-likes-dislikes-post/inprosysmedia-likes-dislikes-post.php+211
    Use of undefined constant WP_UNINSTALL_PLUGIN - assumed 'WP_UNINSTALL_PLUGIN' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: post dislike, dislike count, like count, like, post like...

inprosysmedia-likes-dislikes-post/inprosysmedia-likes-dislikes-post.php Passed 13 tests

The principal PHP file in "Likes and Dislikes Plugin" v. 1.0.0 is loaded by WordPress automatically on each request
100 characters long description:
It helps to like or dislike post as well as store its value in database against user ID and post ID.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin230 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP26245120
CSS111085
JavaScript13020
JSON1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods450.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png40.59KB13.26KB▼ 67.32%
assets/screenshot-3.png40.33KB13.18KB▼ 67.31%
assets/screenshot-1.png40.19KB13.14KB▼ 67.30%