67% wp-likejs

Code Review | WP LikeJS

WordPress plugin WP LikeJS scored67%from 54 tests.

About plugin

  • Plugin page: wp-likejs
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 23, 2012
  • Latest release: Oct 23, 2012
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: 3hmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,289 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.92MB] [CPU: ▼33.33ms] Passed 4 tests

An overview of server-side resources used by WP LikeJS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0524.10 ▼18.05
Dashboard /wp-admin3.02 ▼0.2825.13 ▼34.82
Posts /wp-admin/edit.php3.02 ▼0.3326.02 ▼22.78
Add New Post /wp-admin/post-new.php3.02 ▼2.8625.41 ▼57.68
Media Library /wp-admin/upload.php3.02 ▼0.2121.37 ▼11.74
LikeJS /wp-admin/options-general.php?page=likejs_settings3.0223.40

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP LikeJS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.24 ▼1.501.66 ▼0.3337.69 ▼14.46
Dashboard /wp-admin2,210 ▲225.88 ▲0.9899.42 ▼18.0839.97 ▼3.40
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0441.30 ▲2.2435.59 ▲1.70
Add New Post /wp-admin/post-new.php1,517 ▼217.77 ▼4.99654.92 ▼47.3351.90 ▼13.65
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.0596.28 ▼12.9241.00 ▼4.43
LikeJS /wp-admin/options-general.php?page=likejs_settings9272.0526.1543.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-likejs/wp-likejs.php+123
    Undefined index: action
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=likejs_settings
    • > Notice in wp-content/plugins/wp-likejs/wp-likejs.php+131
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=likejs_settings
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=likejs_settings
    • > Notice in wp-content/plugins/wp-likejs/wp-likejs.php+147
    Undefined index: saved

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-likejs/wp-likejs.php:13

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 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid url: ""
  • Tested up to: Version format is invalid
  • Requires at least: Version format is invalid
You can take inspiration from this readme.txt

wp-likejs/wp-likejs.php 92% from 13 tests

"WP LikeJS" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin241 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12226232
CSS15129

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/bg.png13.19KB3.41KB▼ 74.17%
img/scroll.png7.00KB2.22KB▼ 68.26%
img/close.png2.80KB0.16KB▼ 94.19%
img/likejs.png10.26KB4.69KB▼ 54.24%