84% wp1-like

Code Review | WP1 Like

WordPress plugin WP1 Like scored84%from 54 tests.

About plugin

  • Plugin page: wp1-like
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Aug 16, 2019
  • Latest release: Nov 29, 2020
  • Number of updates: 4
  • Update frequency: every 117.8 days
  • Top authors: wponeco (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /1,849 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.82ms] Passed 4 tests

A check of server-side resources used by WP1 Like
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.02 ▲0.33
Dashboard /wp-admin3.36 ▲0.0146.88 ▼14.93
Posts /wp-admin/edit.php3.41 ▲0.0551.57 ▲0.06
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.32 ▼16.40
Media Library /wp-admin/upload.php3.29 ▲0.0535.26 ▲0.01
WP1 Like /wp-admin/options-general.php?page=wp1_like_admin3.3030.24

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 13 new options
New WordPress options
wp1_like_thumb_icon
wp1_like_button_disabled_color
widget_theysaidso_widget
db_upgraded
wp1_like_post_types
wp1_like_show_count
widget_recent-posts
wp1_like_button_hover_color
wp1_like_button_text
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP1 Like
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲13613.27 ▼1.485.10 ▲3.3038.94 ▲0.20
Dashboard /wp-admin2,222 ▲376.04 ▲1.12113.03 ▲0.1442.72 ▼4.45
Posts /wp-admin/edit.php2,105 ▲162.08 ▲0.0741.88 ▲0.2037.47 ▼1.07
Add New Post /wp-admin/post-new.php1,547 ▲2318.08 ▼5.05619.42 ▼23.2154.49 ▼0.87
Media Library /wp-admin/upload.php1,404 ▲134.35 ▲0.1198.76 ▼3.7540.82 ▼1.12
WP1 Like /wp-admin/options-general.php?page=wp1_like_admin9762.0629.6633.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 13 options in the database
    • wp1_like_button_disabled_color
    • db_upgraded
    • wp1_like_thumb_icon
    • widget_recent-comments
    • wp1_like_button_hover_color
    • wp1_like_button_color
    • theysaidso_admin_options
    • can_compress_scripts
    • wp1_like_show_count
    • wp1_like_post_types
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp1-like/wp1-like_option.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "WP1 Like" version 1.1
86 characters long description:
Simple Like button plugin for posts, pages, custom post types and WooCommerce products

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,742 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13291611,365
PHP42821358
CSS10019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin