84% simple-custom-post-likes

Code Review | Simple custom post likes

WordPress plugin Simple custom post likes scored84%from 54 tests.

About plugin

  • Plugin page: simple-custom-pos...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2015
  • Latest release: Mar 12, 2015
  • Number of updates: 9
  • Update frequency: every 1.4 days
  • Top authors: richymilo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,325 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.44ms] Passed 4 tests

A check of server-side resources used by Simple custom post likes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.06 ▼3.84
Dashboard /wp-admin3.33 ▼0.0254.69 ▼9.80
Posts /wp-admin/edit.php3.38 ▲0.0250.42 ▲0.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.31 ▲0.47
Media Library /wp-admin/upload.php3.25 ▲0.0235.53 ▼4.29
Favourite Posts /wp-admin/options-general.php?page=simple-custom-post-likes/admin.php3.2230.55

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Simple custom post likes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.72 ▲0.352.07 ▲0.4940.93 ▲0.43
Dashboard /wp-admin2,199 ▲195.61 ▼0.0789.69 ▼4.3938.18 ▼2.47
Posts /wp-admin/edit.php2,107 ▲41.97 ▲0.0239.75 ▼2.4235.69 ▼7.80
Add New Post /wp-admin/post-new.php1,536 ▲1023.28 ▲0.07663.50 ▼19.0059.25 ▲3.45
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.1194.74 ▼15.8142.27 ▼7.75
Favourite Posts /wp-admin/options-general.php?page=simple-custom-post-likes/admin.php8232.0025.5129.51

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-custom-post-likes/index.php:62
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/simple-custom-post-likes/admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: likes, featured, custom post types

simple-custom-post-likes/index.php 92% from 13 tests

The primary PHP file in "Simple custom post likes" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-custom-post-likes.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin190 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22514177
CSS10013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin