84% post-likerator

Code Review | Post Likerator

WordPress plugin Post Likerator scored 84% from 54 tests.

About plugin

  • Plugin page: post-likerator
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.2-4.8.2
  • WordPress version: 5.8.1
  • First release: Oct 19, 2017
  • Latest release: Oct 19, 2017
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: flipeleven (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 603 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼141.83ms] Passed 4 tests

An overview of server-side resources used by Post Likerator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1739.09 ▲13.92
Dashboard /wp-admin3.11 ▲0.0549.85 ▼3.05
Posts /wp-admin/edit.php3.22 ▲0.1148.24 ▼4.92
Add New Post /wp-admin/post-new.php5.47 ▲0.0496.60 ▼548.72
Media Library /wp-admin/upload.php3.05 ▲0.0537.05 ▼10.62

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: 1 new table, no new options
New tables
wp_post_likerator_likes

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Likerator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲21316.14 ▲0.599.96 ▼2.1551.68 ▼3.34
Dashboard /wp-admin2,989 ▲555.96 ▼0.03140.92 ▼4.90116.89 ▲0.34
Posts /wp-admin/edit.php2,736 ▼32.69 ▲0.0072.77 ▲3.65100.33 ▼0.10
Add New Post /wp-admin/post-new.php1,594 ▼8918.84 ▲1.42400.38 ▲18.80118.83 ▲4.33
Media Library /wp-admin/upload.php1,807 ▼05.04 ▼0.03162.95 ▲16.33131.56 ▲7.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_post_likerator_likes

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 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-likerator/library/main.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: like, like posts, thumbs up, developer friendly

post-likerator/post-likerator.php 92% from 13 tests

The main PHP file in "Post Likerator" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin287 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP57671250
JavaScript17037

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.50
▷ Minimum class complexity4.00
▷ Maximum class complexity7.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods416.67%
▷ Public methods2083.33%
▷ Protected methods312.50%
▷ Private methods14.17%
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
There were not PNG files found in your plugin