94% gp-post-like

Code Review | Gp post Like

WordPress plugin Gp post Like scored 94% from 54 tests.

About plugin

  • Plugin page: gp-post-like
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.3
  • WordPress version: 5.8.1
  • First release: Jun 29, 2016
  • Latest release: Feb 6, 2018
  • Number of updates: 4
  • Update frequency: every 146.8 days
  • Top authors: ganeshpaygude (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active / 1,468 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼141.30ms] Passed 4 tests

This is a short check of server-side resources used by Gp post Like
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0435.64 ▲1.82
Dashboard /wp-admin3.09 ▲0.0349.71 ▲7.00
Posts /wp-admin/edit.php3.14 ▲0.0446.81 ▲0.54
Add New Post /wp-admin/post-new.php5.45 ▲0.0189.09 ▼563.92
Media Library /wp-admin/upload.php3.03 ▲0.0332.61 ▼3.65

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Gp post Like
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,814 ▲21816.34 ▲0.7711.79 ▼0.7546.71 ▼1.69
Dashboard /wp-admin2,979 ▲485.93 ▼0.23137.63 ▼47.51127.62 ▲13.84
Posts /wp-admin/edit.php2,773 ▲372.72 ▼0.1168.85 ▼1.1288.73 ▲0.50
Add New Post /wp-admin/post-new.php1,696 ▲19618.48 ▲0.01393.59 ▲16.87112.69 ▲4.71
Media Library /wp-admin/upload.php1,770 ▼375.04 ▲0.00136.27 ▼21.17130.10 ▲16.43

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gp-post-like/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Screenshot-1) image missing
Please take inspiration from this readme.txt

gp-post-like/index.php 92% from 13 tests

Analyzing the main PHP file in "Gp post Like" version 1.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gp-post-like.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin195 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15531148
JavaScript15326
CSS14021

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.17
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/like-icon.png0.45KB0.62KB0.00%
images/liked-icon.png1.55KB1.37KB▼ 11.96%