84% post-like

Code Review | Post Like

WordPress plugin Post Like scored84%from 54 tests.

About plugin

  • Plugin page: post-like
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 12, 2018
  • Latest release: Feb 17, 2019
  • Number of updates: 9
  • Update frequency: every 24.5 days
  • Top authors: talentedaamer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,510 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.29ms] Passed 4 tests

This is a short check of server-side resources used by Post Like
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.15 ▼1.96
Dashboard /wp-admin3.44 ▲0.1454.76 ▲4.61
Posts /wp-admin/edit.php3.49 ▲0.1449.61 ▲3.40
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.63 ▼4.07
Media Library /wp-admin/upload.php3.28 ▲0.0534.07 ▼2.51
Post Like Settings /wp-admin/options-general.php?page=post_like_options3.2835.15

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
pl_basic
pl_style
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Post Like
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,097 ▲33615.41 ▲0.805.35 ▲3.5542.67 ▼1.36
Dashboard /wp-admin2,389 ▲2096.35 ▲0.67120.23 ▲19.9041.76 ▼1.02
Posts /wp-admin/edit.php2,317 ▲2203.49 ▲1.5049.04 ▲10.5330.16 ▼5.14
Add New Post /wp-admin/post-new.php1,574 ▲4623.20 ▲0.12649.47 ▼37.5538.18 ▼21.19
Media Library /wp-admin/upload.php1,454 ▲574.28 ▲0.0783.18 ▼23.3841.40 ▼4.82
Post Like Settings /wp-admin/options-general.php?page=post_like_options1,3773.8160.4087.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/post-like/post-like.php
    • > /wp-content/plugins/post-like/uninstall.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: like, post, count, love, unlike

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

This is the main PHP file of "Post Like" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
131 characters long description:
Post like is a simple ajax based post like/unlike plugin that help your visitors to like posts. Counter shows number of post likes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,091 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP6209450818
CSS2135190
JavaScript1111156
SVG20427

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity30.75
▷ Minimum class complexity3.00
▷ Maximum class complexity70.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods53
▷ Static methods11.89%
▷ Public methods53100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin