10% comments-mover

Code Review | Comments Mover

WordPress plugin Comments Mover scored 10% from 54 tests.

About plugin

  • Plugin page: comments-mover
  • Plugin version: 1.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-5.4
  • WordPress version: 6.3.1
  • First release: May 28, 2020
  • Latest release: May 28, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: brijeshdhanani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 466 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/comments-mover/move-comments.php+60
    Undefined index: target_post_id

Server metrics [RAM: ▼0.91MB] [CPU: ▼32.80ms] Passed 4 tests

An overview of server-side resources used by Comments Mover
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.11 ▼4.94
Dashboard /wp-admin3.03 ▼0.2724.64 ▼19.97
Posts /wp-admin/edit.php3.03 ▼0.3222.79 ▼25.94
Add New Post /wp-admin/post-new.php3.03 ▼2.8523.98 ▼72.22
Media Library /wp-admin/upload.php3.03 ▼0.2022.06 ▼13.05
Move Comments /wp-admin/edit-comments.php?page=comments-mover/move-comments.php3.0922.98
All Comments /wp-admin/edit-comments.php3.0922.82

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Comments Mover
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8713.56 ▼0.721.94 ▲0.1043.68 ▼0.50
Dashboard /wp-admin2,222 ▲345.86 ▼0.0597.19 ▼1.2536.71 ▼7.48
Posts /wp-admin/edit.php2,108 ▲192.02 ▼0.0334.51 ▼1.3731.85 ▼3.65
Add New Post /wp-admin/post-new.php1,545 ▲923.25 ▼0.12684.94 ▲54.2255.51 ▼0.18
Media Library /wp-admin/upload.php1,410 ▲224.26 ▲0.0295.43 ▼5.6043.79 ▼1.56
Move Comments /wp-admin/edit-comments.php?page=comments-mover/move-comments.php8362.0328.0527.09
All Comments /wp-admin/edit-comments.php1,8142.3036.0534.60

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
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/comments-mover/move-comments.php+60
    Undefined index: target_post_id
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-comments.php
    • > 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.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-comments.php?page=comments-mover/move-comments.php
    • > Notice in wp-content/plugins/comments-mover/move-comments.php+129
    Undefined index: source_post_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-comments.php?page=comments-mover/move-comments.php
    • > Notice in wp-content/plugins/comments-mover/update-db.php+48
    Undefined variable: postStatus
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-comments.php?page=comments-mover/move-comments.php
    • > Notice in wp-content/plugins/comments-mover/move-comments.php+281
    Undefined index: target_post_id
    • > GET request to /wp-admin/edit-comments.php?page=comments-mover/move-comments.php
    • > Notice in wp-content/plugins/comments-mover/move-comments.php+297
    Trying to access array offset on value of type null

SRP 0% 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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/comments-mover/move-comments.php
    • > /wp-content/plugins/comments-mover/update-db.php
    • > /wp-content/plugins/comments-mover/comments-helper.php
  • 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/comments-mover/comments_mover_functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: migrate wp comments, move all comments, page, comments

comments-mover/move-comments.php 92% from 13 tests

This is the main PHP file of "Comments Mover" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("comments-mover.php" instead of "move-comments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin381 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP46648368
CSS12013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.67
▷ Minimum class complexity4.00
▷ Maximum class complexity41.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin