84% qmean

Code Review | QMean - WordPress Did You Mean and Search Suggestion Like Google

WordPress plugin QMean - WordPress Did You Mean and Search Suggestion Like Google scored84%from 54 tests.

About plugin

  • Plugin page: qmean
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 5, 2021
  • Latest release: Jul 22, 2023
  • Number of updates: 21
  • Update frequency: every 39.9 days
  • Top authors: arashsafari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,445 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.30MB] [CPU: ▼2.82ms] Passed 4 tests

Analyzing server-side resources used by QMean - WordPress Did You Mean and Search Suggestion Like Google
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5041.99 ▲4.78
Dashboard /wp-admin3.59 ▲0.2948.64 ▲0.22
Posts /wp-admin/edit.php3.71 ▲0.3547.35 ▲0.07
Add New Post /wp-admin/post-new.php6.17 ▲0.2989.62 ▼15.74
Media Library /wp-admin/upload.php3.52 ▲0.2937.67 ▲4.19
Settings /wp-admin/admin.php?page=qmean-settings3.6533.65
QMean /wp-admin/admin.php?page=qmean3.5236.96

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: 1 new table, 7 new options
New tables
wp_qmean_keyword
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
_qmean_keyword_table

Browser metrics Passed 4 tests

This is an overview of browser requirements for QMean - WordPress Did You Mean and Search Suggestion Like Google
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲20013.80 ▼0.4710.60 ▲8.9943.15 ▲3.51
Dashboard /wp-admin2,235 ▲555.57 ▼0.0984.81 ▼4.6465.16 ▲20.71
Posts /wp-admin/edit.php2,143 ▲431.99 ▲0.0138.57 ▲0.0835.79 ▲1.28
Add New Post /wp-admin/post-new.php6,406 ▲4,87127.64 ▲9.17923.49 ▲307.8440.24 ▼23.38
Media Library /wp-admin/upload.php1,443 ▲404.14 ▼0.05102.30 ▲1.2678.53 ▲34.33
Settings /wp-admin/admin.php?page=qmean-settings2,0522.5749.1027.02
QMean /wp-admin/admin.php?page=qmean9841.7026.0131.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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 items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/qmean/qmean.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qmean/inc/class-ajax.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/qmean/templates/dashboard/dashboard.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/qmean/templates/dashboard/modals/user-eye.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/qmean/templates/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Requires php: Invalid plugin version format
Please take inspiration from this readme.txt

qmean/qmean.php 92% from 13 tests

The primary PHP file in "QMean - WordPress Did You Mean and Search Suggestion Like Google" version 2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 186 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected3,344 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP112864121,772
CSS4152592
JavaScript5326473
PO File1429789426
SVG20268
JSON10013

PHP code Passed 2 tests

This is a very shot review 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.35
Average class complexity35.33
▷ Minimum class complexity2.00
▷ Maximum class complexity98.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods56
▷ Static methods35.36%
▷ Public methods4478.57%
▷ Protected methods00.00%
▷ Private methods1221.43%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin