74% i-like

Code Review | I like

WordPress plugin I like scored74%from 54 tests.

About plugin

  • Plugin page: i-like
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2020
  • Latest release: Mar 31, 2020
  • Number of updates: 4
  • Update frequency: every 8.2 days
  • Top authors: mehulrojasara (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /854 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by I like
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0845.15 ▲3.56
Dashboard /wp-admin3.39 ▲0.0550.38 ▼10.34
Posts /wp-admin/edit.php3.44 ▲0.0951.54 ▲1.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0995.37 ▼7.74
Media Library /wp-admin/upload.php3.31 ▲0.0937.39 ▲2.13

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: 1 new table, 6 new options
New tables
wp_i_like_table
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for I like
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.65 ▼0.654.54 ▲2.8442.71 ▲2.67
Dashboard /wp-admin2,218 ▲274.88 ▼0.01105.67 ▲1.2138.74 ▼1.01
Posts /wp-admin/edit.php2,101 ▲92.01 ▼0.0137.56 ▼3.8034.15 ▼0.33
Add New Post /wp-admin/post-new.php1,543 ▲123.24 ▲5.01685.89 ▲53.7754.50 ▼4.55
Media Library /wp-admin/upload.php1,400 ▲124.23 ▼0.1498.04 ▼10.4343.83 ▼3.80

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
  • Zombie tables detected upon uninstall: 1 table
    • wp_i_like_table
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/i-like/inc/i_like_add_setting_link.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: blog, dislike, i-like, like, react

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

This is the main PHP file of "I like" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
119 characters long description:
A Simple way to display beautiful Like and Dislike buttons under each post, also add total likes and dislikes counters.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected9,450 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,026
PHP76456344
JavaScript23364
CSS24916

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin