83% mtr-qtan

Code Review | mtr-QTAN

WordPress plugin mtr-QTAN scored83%from 54 tests.

About plugin

  • Plugin page: mtr-qtan
  • Plugin version: 5.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3
  • WordPress version: 6.3.1
  • First release: Apr 26, 2012
  • Latest release: Aug 12, 2014
  • Number of updates: 39
  • Update frequency: every 21.5 days
  • Top authors: nguyenvanduocit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,379 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.14MB] [CPU: ▼11.75ms] Passed 4 tests

This is a short check of server-side resources used by mtr-QTAN
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.51 ▼3.73
Dashboard /wp-admin3.16 ▼0.1432.37 ▼19.95
Posts /wp-admin/edit.php3.31 ▼0.0536.72 ▼14.53
Add New Post /wp-admin/post-new.php5.49 ▼0.3982.42 ▼8.80
Media Library /wp-admin/upload.php3.25 ▲0.0233.27 ▼3.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_qtan-player
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for mtr-QTAN
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,568 ▼17814.35 ▲0.011.74 ▼0.0639.88 ▼6.54
Dashboard /wp-admin1,975 ▼2165.59 ▲0.6986.40 ▼12.1547.29 ▲8.19
Posts /wp-admin/edit.php2,108 ▲191.97 ▲0.0054.12 ▲17.2343.40 ▲9.10
Add New Post /wp-admin/post-new.php1,527 ▲1317.38 ▼0.12626.83 ▲8.2252.27 ▲1.90
Media Library /wp-admin/upload.php1,404 ▲164.22 ▼0.0296.49 ▼7.8945.11 ▼0.55

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_qtan-player
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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 items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/mtr-qtan/scb/BoxesPage.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'scbBoxesPage' not found in wp-content/plugins/mtr-qtan/include/Qtan.adminpage.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mtr-qtan/scb/Widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtr-qtan/scb/load.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'scbWidget' not found in wp-content/plugins/mtr-qtan/include/widget/QtanPlayer.widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'scbBoxesPage' not found in wp-content/plugins/mtr-qtan/include/Qtan.adminpage.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Screenshot #1 (other style) image not found
The official readme.txt might help

mtr-qtan/wp-qtan.php 77% from 13 tests

Analyzing the main PHP file in "mtr-QTAN" version 5.1.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("mtr-qtan.php" instead of "wp-qtan.php")
  • Domain Path: The domain path points to a folder that does not exist ("/lang")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin3,054 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP226498253,002
JSON10022
JavaScript12317
CSS11013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.13
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes30
▷ Abstract classes516.67%
▷ Concrete classes2583.33%
▷ Final classes00.00%
Methods214
▷ Static methods6329.44%
▷ Public methods17481.31%
▷ Protected methods2913.55%
▷ Private methods115.14%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
4 PNG files occupy 0.41MB with 0.27MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/step.png41.39KB8.32KB▼ 79.89%
screenshot-1.png12.21KB7.28KB▼ 40.34%
screenshot-3.png157.01KB48.85KB▼ 68.89%
screenshot-2.png213.75KB69.43KB▼ 67.52%