72% dx-auto-tags

Code Review | DX-auto-tags

WordPress plugin DX-auto-tags scored72%from 54 tests.

About plugin

  • Plugin page: dx-auto-tags
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5
  • WordPress version: 6.3.1
  • First release: Sep 22, 2012
  • Latest release: Dec 28, 2012
  • Number of updates: 10
  • Update frequency: every 9.7 days
  • Top authors: daxiawp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /8,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.66MB] [CPU: ▼19.50ms] Passed 4 tests

This is a short check of server-side resources used by DX-auto-tags
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.79 ▼8.06
Dashboard /wp-admin3.33 ▲0.0349.12 ▼0.18
Posts /wp-admin/edit.php3.39 ▲0.0351.65 ▲2.52
Add New Post /wp-admin/post-new.php3.16 ▼2.7234.31 ▼69.94
Media Library /wp-admin/upload.php3.26 ▲0.0334.40 ▲0.17
daxiawp主题商城 /wp-admin/admin.php?page=daxiawp_theme3.2229.52
DX-auto-tags /wp-admin/admin.php?page=dx-auto-tags3.2334.63

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for DX-auto-tags
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.41 ▲0.061.70 ▼0.3044.55 ▼0.22
Dashboard /wp-admin2,206 ▲295.59 ▼0.0981.22 ▼6.2280.20 ▲41.05
Posts /wp-admin/edit.php2,123 ▲232.01 ▲0.0435.41 ▲0.4338.37 ▲5.33
Add New Post /wp-admin/post-new.php1,561 ▲3322.97 ▼0.22651.88 ▼48.80162.35 ▲96.31
Media Library /wp-admin/upload.php1,429 ▲324.16 ▼0.0295.65 ▼1.9377.16 ▲33.11
daxiawp主题商城 /wp-admin/admin.php?page=daxiawp_theme1,0564.35128.4355.68
DX-auto-tags /wp-admin/admin.php?page=dx-auto-tags9802.0124.0651.34

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=dx-auto-tags
    • > Notice in wp-content/plugins/dx-auto-tags/tags-list.php+2
    Undefined index: max-tags-button
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dx-auto-tags
    • > Notice in wp-content/plugins/dx-auto-tags/tags-list.php+104
    Undefined index: start
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dx-auto-tags
    • > Notice in wp-content/plugins/dx-auto-tags/tags-list.php+104
    Undefined index: end
    • > GET request to /wp-admin/admin.php?page=dx-auto-tags
    • > Notice in wp-content/plugins/dx-auto-tags/dx-auto-tags.php+117
    Undefined index: one-key
    • > GET request to /wp-admin/admin.php?page=dx-auto-tags
    • > Notice in wp-content/plugins/dx-auto-tags/dx-auto-tags.php+37
    Undefined index: insert-tags
    • > GET request to /wp-admin/admin.php?page=dx-auto-tags
    • > Notice in wp-content/plugins/dx-auto-tags/dx-auto-tags.php+42
    Undefined index: update-tags
    • > GET request to /wp-admin/admin.php?page=dx-auto-tags
    • > Notice in wp-content/plugins/dx-auto-tags/dx-auto-tags.php+49
    Undefined index: delete-tags

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function web589_get_tags_data() in wp-content/plugins/dx-auto-tags/tags-list.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dx-auto-tags/theme.php:4
    • > PHP Notice
      Undefined index: max-tags-button in wp-content/plugins/dx-auto-tags/tags-list.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/dx-auto-tags/dx-auto-tags.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Javascript (warning) in unknown
    http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/dcrm?di=454435&uuid=81978fe5d4f3b576&dri=0&dis=0&dai=0&ps=204x64&enu=encoding&exps=110011&ant=0&psi=d545b6746b39fb9c&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697867380536&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=daxiawp%E4%B8%BB%E9%A2%98&dbv=2&drs=1&pcs=800x585&pss=1038x585&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697867380&prot=2&rw=600&ltu=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697867381, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Javascript (warning) in unknown
    http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/dcrm?di=454451&uuid=566e7c1242faccd4&dri=0&dis=0&dai=0&ps=204x386&enu=encoding&exps=110011&ant=0&psi=d545b6746b39fb9c&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697867380536&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454435%22)%3B&dbv=2&drs=1&pcs=800x585&pss=1038x585&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697867382&prot=2&rw=600&ltu=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697867382, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Javascript (warning) in unknown
    http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/dcrm?di=454453&uuid=2f0f895208d366ae&dri=0&dis=0&dai=0&ps=204x708&enu=encoding&exps=110011&ant=0&psi=d545b6746b39fb9c&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697867380536&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454451%22)%3B&dbv=2&drs=1&pcs=800x585&pss=1038x585&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697867382&prot=2&rw=600&ltu=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697867383, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Javascript (warning) in unknown
    http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/dcrm?di=454454&uuid=319e4bd42096bebb&dri=0&dis=0&dai=0&ps=456x64&enu=encoding&exps=110011&ant=0&psi=d545b6746b39fb9c&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697867380536&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454453%22)%3B&dbv=2&drs=1&pcs=800x585&pss=1038x585&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697867382&prot=2&rw=600&ltu=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697867383, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Javascript (warning) in unknown
    http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/dcrm?di=454455&uuid=8eed040d6fbb83b4&dri=0&dis=0&dai=0&ps=456x386&enu=encoding&exps=110011&ant=0&psi=d545b6746b39fb9c&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697867380536&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454454%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x768&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697867383&prot=2&rw=600&ltu=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697867383, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Javascript (warning) in unknown
    http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/dcrm?di=454457&uuid=50db4ab7b526ef7b&dri=0&dis=0&dai=0&ps=456x708&enu=encoding&exps=110011&ant=0&psi=d545b6746b39fb9c&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697867380536&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454455%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x768&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697867384&prot=2&rw=600&ltu=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697867384, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Javascript (warning) in unknown
    http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/dcrm?di=454459&uuid=a89f94ad9aac1ef0&dri=0&dis=0&dai=0&ps=708x64&enu=encoding&exps=110011&ant=0&psi=d545b6746b39fb9c&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697867380536&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454457%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x795&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697867385&prot=2&rw=600&ltu=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697867385, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Javascript (warning) in unknown
    http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/dcrm?di=454461&uuid=14f0825f5ad6ec24&dri=0&dis=0&dai=0&ps=708x386&enu=encoding&exps=110011&ant=0&psi=d545b6746b39fb9c&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697867380536&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454459%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x1020&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697867385&prot=2&rw=600&ltu=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697867386, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Javascript (warning) in unknown
    http://cbjs.baidu.com/js/m.js 0 A parser-blocking, cross site (i.e. different eTLD+1) script, https://pos.baidu.com/dcrm?di=454462&uuid=105cb09cded3f363&dri=0&dis=0&dai=0&ps=708x708&enu=encoding&exps=110011&ant=0&psi=d545b6746b39fb9c&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1697867380536&ti=%E4%B8%BB%E9%A2%98%E5%95%86%E5%9F%8E%20%E2%80%B9%20Potrivit%20%E2%80%94%20WordPress&ari=2&ver=0830&vc=BAIDU_CLB_fillSlot(%22454461%22)%3B&dbv=2&drs=1&pcs=785x585&pss=1038x1020&cfv=0&cpl=0&chi=14&cce=true&cec=UTF-8&tlm=1697867385&prot=2&rw=600&ltu=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Ddaxiawp_theme&ecd=1&dft=0&uc=800x600&pis=-1x-1&sr=800x600&tcn=1697867386, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (后台截图) image missing
  • Plugin Name: Please specify the plugin name on the first line ( === dx-auto-tags === )
You can take inspiration from this readme.txt

dx-auto-tags/dx-auto-tags.php Passed 13 tests

The main PHP script in "DX-auto-tags" version 1.2 is automatically included on every request by WordPress
102 characters long description:
自动搜索自定义的标签列表,如果文章内容包含该文本,则自动添加文章标签

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin257 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34622257

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.73KB0.73KB0.13%