78% mxp-dev-tools

Code Review | 一介資男(Mxp.TW) 開發工具箱

WordPress plugin 一介資男(Mxp.TW) 開發工具箱 scored78%from 54 tests.

About plugin

  • Plugin page: mxp-dev-tools
  • Plugin version: 2.7.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Feb 8, 2017
  • Latest release: Oct 10, 2023
  • Number of updates: 71
  • Update frequency: every 34.3 days
  • Top authors: mxp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,978 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.05ms] 50% from 4 tests

This is a short check of server-side resources used by 一介資男(Mxp.TW) 開發工具箱
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 5,146.55ms on /wp-admin/admin.php?page=mxp-recently-mod_files)
  • RAM: Try to keep total memory usage under 10MB (currently 243.59MB on /wp-admin/admin.php?page=mxp-recently-mod_files)
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.41 ▼1.21
Dashboard /wp-admin3.37 ▲0.0742.08 ▼6.26
Posts /wp-admin/edit.php3.49 ▲0.1350.25 ▲3.68
Add New Post /wp-admin/post-new.php5.97 ▲0.0977.68 ▼18.16
Media Library /wp-admin/upload.php3.30 ▲0.0732.62 ▼2.55
作者外掛列表 /wp-admin/admin.php?page=mxp-author-plugins3.62611.45
查看網站各項設定 /wp-admin/admin.php?page=mxp-get-wp-config3.491,716.17
調整內容作者工具 /wp-admin/admin.php?page=mxp-change-post-owner3.2630.66
查看最近變更檔案 /wp-admin/admin.php?page=mxp-recently-mod_files243.595,146.55
WP 資料庫最佳化 /wp-admin/admin.php?page=mxp-wpdb-optimize-methods3.2634.13
資料庫檢視與匯出 /wp-admin/admin.php?page=mxp-db-op-methods3.5338.12
主題打包工具 /wp-admin/admin.php?page=mxp-theme-archive3.2828.46
主機 PHP 設定 /wp-admin/admin.php?page=mxp-get-php-info3.5634.04
外掛搜尋工具 /wp-admin/admin.php?page=mxp-search-plugins3.2630.77
資料庫關鍵字取代 /wp-admin/admin.php?page=mxp-db-replace-methods3.2733.45

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
recovery_mode_email_last_sent
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for 一介資男(Mxp.TW) 開發工具箱
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲7014.40 ▲0.111.68 ▼0.1937.94 ▼8.06
Dashboard /wp-admin2,265 ▲885.60 ▼0.0197.85 ▲11.6955.23 ▲4.72
Posts /wp-admin/edit.php2,167 ▲672.02 ▼0.0138.92 ▲2.1148.99 ▲16.91
Add New Post /wp-admin/post-new.php1,578 ▲4123.43 ▲5.12699.80 ▲70.8260.00 ▼3.01
Media Library /wp-admin/upload.php1,464 ▲644.26 ▲0.0394.34 ▼2.7949.44 ▲5.24
作者外掛列表 /wp-admin/admin.php?page=mxp-author-plugins1,2312.0422.8760.30
查看網站各項設定 /wp-admin/admin.php?page=mxp-get-wp-config2,8782.1223.1985.81
調整內容作者工具 /wp-admin/admin.php?page=mxp-change-post-owner8762.0023.2841.79
查看最近變更檔案 /wp-admin/admin.php?page=mxp-recently-mod_files8931.126.1249.25
WP 資料庫最佳化 /wp-admin/admin.php?page=mxp-wpdb-optimize-methods1,1252.1923.6065.47
資料庫檢視與匯出 /wp-admin/admin.php?page=mxp-db-op-methods1,0022.0225.8550.83
主題打包工具 /wp-admin/admin.php?page=mxp-theme-archive8922.0323.2843.31
主機 PHP 設定 /wp-admin/admin.php?page=mxp-get-php-info9,4651.8429.4283.57
外掛搜尋工具 /wp-admin/admin.php?page=mxp-search-plugins1,0803.3757.0241.81
資料庫關鍵字取代 /wp-admin/admin.php?page=mxp-db-replace-methods1,0142.0224.6950.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=mxp-recently-mod_files
    • > Error in wp-content/plugins/mxp-dev-tools/includes/utility.php+197
    Allowed memory size of 268435456 bytes exhausted (tried to allocate 23068968 bytes)

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=mxp-search-plugins
    • > Console-api (warning) in unknown
    https://cdn.jsdelivr.net/npm/typesense-instantsearch-adapter@2/dist/typesense-instantsearch-adapter.min.js 1:112285 "[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camelCased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: admin, installation, api, chinese, plugin...

mxp-dev-tools/index.php 92% from 13 tests

The main PHP file in "一介資男(Mxp.TW) 開發工具箱" ver. 2.7.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mxp-dev-tools.php" instead of "index.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
There were no executable files found in this plugin6,434 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP104927895,327
JavaScript65411,107

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity40.15
▷ Minimum class complexity1.00
▷ Maximum class complexity253.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces2
Interfaces0
Traits4
Classes16
▷ Abstract classes425.00%
▷ Concrete classes1275.00%
▷ Final classes00.00%
Methods216
▷ Static methods62.78%
▷ Public methods18183.80%
▷ Protected methods10.46%
▷ Private methods3415.74%
Functions15
▷ Named functions00.00%
▷ Anonymous functions15100.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.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