83% mqtranslate-separate-comments

Code Review | mqTranslate Separate Comments

WordPress plugin mqTranslate Separate Comments scored83%from 54 tests.

About plugin

  • Plugin page: mqtranslate-separ...
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9+
  • WordPress version: 6.3.1
  • First release: Dec 11, 2014
  • Latest release: Dec 13, 2014
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: zhenya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.12ms] Passed 4 tests

This is a short check of server-side resources used by mqTranslate Separate Comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.73 ▼2.14
Dashboard /wp-admin3.31 ▲0.0150.39 ▲3.54
Posts /wp-admin/edit.php3.36 ▲0.0048.36 ▼1.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.10 ▼7.35
Media Library /wp-admin/upload.php3.23 ▲0.0032.84 ▼1.13

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for mqTranslate Separate Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.21 ▼1.084.61 ▲2.6141.31 ▼7.13
Dashboard /wp-admin2,206 ▲175.88 ▲0.93100.63 ▼13.4037.74 ▼2.44
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0340.27 ▼2.5035.70 ▲1.57
Add New Post /wp-admin/post-new.php1,547 ▲1318.25 ▼4.87597.95 ▲2.4665.99 ▲10.08
Media Library /wp-admin/upload.php1,385 ▼64.30 ▲0.1194.68 ▼2.9940.59 ▼1.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Comment_Query' not found in wp-content/plugins/mqtranslate-separate-comments/qtranslate-separate-comments.php:411

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (This is the notification message when a comment's language has either not been set-up or that language is currently disabled.), #2 (Here you can see different aspects of the back-end integration.)
  • Tested up to: Version format is invalid
The official readme.txt is a good inspiration

mqtranslate-separate-comments/qtranslate-separate-comments.php 85% from 13 tests

The main file in "mqTranslate Separate Comments" v. 1.2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 296 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mqtranslate-separate-comments.php" instead of "qtranslate-separate-comments.php")

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
Good job! No executable or dangerous file extensions detected423 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP182144384
PO File191639

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity29.50
▷ Minimum class complexity25.00
▷ Maximum class complexity34.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods1588.24%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin