84% wp-postlike

Code Review | WP-Postlike

WordPress plugin WP-Postlike scored84%from 54 tests.

About plugin

  • Plugin page: wp-postlike
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 4, 2014
  • Latest release: Oct 24, 2023
  • Number of updates: 13
  • Update frequency: every 256.8 days
  • Top authors: fatesinger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /6,153 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WP-Postlike
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0725.69 ▼12.76
Dashboard /wp-admin3.32 ▲0.0245.26 ▲2.45
Posts /wp-admin/edit.php3.37 ▲0.0146.02 ▲7.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.31 ▼17.76
Media Library /wp-admin/upload.php3.25 ▲0.0136.20 ▲4.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP-Postlike
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.07 ▼0.271.97 ▲0.1044.12 ▲0.50
Dashboard /wp-admin2,198 ▲185.57 ▼0.2795.81 ▲8.2544.93 ▲8.06
Posts /wp-admin/edit.php2,103 ▼02.02 ▲0.0335.76 ▼6.2533.48 ▼5.35
Add New Post /wp-admin/post-new.php1,526 ▼023.15 ▲0.06661.21 ▲31.5750.51 ▼0.76
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0397.21 ▲2.4043.53 ▲1.76

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× 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/wp-postlike/functions.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-postlike/wp-postlike.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: wordpress

wp-postlike/wp-postlike.php Passed 13 tests

The main PHP script in "WP-Postlike" version 2.0.0 is automatically included on every request by WordPress
54 characters long description:
Adds an AJAX like for your WordPress blog's post/page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected93 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2101144
JavaScript10034
CSS10015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Constants4
▷ Global constants4100.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
No PNG files were detected