78% mm-search

Code Review | MM Search

WordPress plugin MM Search scored78%from 54 tests.

About plugin

  • Plugin page: mm-search
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2017
  • Latest release: Nov 23, 2017
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: Ye Min Htut (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /724 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.03MB] [CPU: ▼6.55ms] Passed 4 tests

Server-side resources used by MM Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.68 ▼6.49
Dashboard /wp-admin3.35 ▲0.0048.93 ▼15.09
Posts /wp-admin/edit.php3.40 ▲0.0447.89 ▼3.05
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.78 ▼1.58
Media Library /wp-admin/upload.php3.27 ▲0.0440.74 ▲2.58
About MM Search /wp-admin/admin.php?page=mm-search-about3.2333.61
MM Search Settings /wp-admin/admin.php?page=mm-search-settings3.2132.79

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for MM Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8113.21 ▼0.991.76 ▼0.2141.11 ▲2.12
Dashboard /wp-admin2,248 ▲455.85 ▲0.92108.65 ▲4.2842.54 ▼0.88
Posts /wp-admin/edit.php2,127 ▲241.98 ▼0.0139.81 ▼1.3535.51 ▼2.52
Add New Post /wp-admin/post-new.php1,554 ▲2223.24 ▼0.06688.60 ▲91.2960.07 ▲10.01
Media Library /wp-admin/upload.php1,427 ▲304.20 ▲0.03106.59 ▲6.2845.16 ▲0.97
About MM Search /wp-admin/admin.php?page=mm-search-about8502.0225.2930.66
MM Search Settings /wp-admin/admin.php?page=mm-search-settings8302.0723.4427.48

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=mm-search-settings
    • > Notice in wp-content/plugins/mm-search/admin/settings.php+5
    Undefined index: mm-search-update-option

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 take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(MM_SEARCH_ADMIN_DIR/about.php): failed to open stream: No such file or directory in wp-content/plugins/mm-search/admin/admin.php on line 4
    • > PHP Warning
      Use of undefined constant MM_SEARCH_ADMIN_DIR - assumed 'MM_SEARCH_ADMIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/mm-search/admin/admin.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mm-search/search.php:17
    • > PHP Fatal error
      require_once(): Failed opening required 'MM_SEARCH_ADMIN_DIR/about.php' (include_path='.:/usr/share/php') in wp-content/plugins/mm-search/admin/admin.php on line 4

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === mm-search === )
The official readme.txt might help

mm-search/search.php 92% from 13 tests

"MM Search" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mm-search.php" instead of "search.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin153 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP53145153

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods266.67%
▷ Protected methods133.33%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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