10% dx-auto-publish

Code Review | DX-auto-publish

WordPress plugin DX-auto-publish scored10%from 54 tests.

About plugin

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

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /12,811 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/dx-auto-publish/dx-auto-publish.php+64
    date_default_timezone_set(): Timezone ID '' is invalid

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.96ms] Passed 4 tests

An overview of server-side resources used by DX-auto-publish
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.433.84 ▼36.64
Dashboard /wp-admin2.05 ▼1.265.70 ▼42.96
Posts /wp-admin/edit.php2.05 ▼1.317.04 ▼39.25
Add New Post /wp-admin/post-new.php2.05 ▼3.845.05 ▼85.00
Media Library /wp-admin/upload.php2.05 ▼1.184.95 ▼29.27
自动定时发布 /wp-admin/admin.php?page=DX-auto-publish2.055.98
daxiawp主题商城 /wp-admin/admin.php?page=daxiawp_theme2.056.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for DX-auto-publish
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9113.17 ▼1.471.64 ▼0.1641.22 ▼3.49
Dashboard /wp-admin2,232 ▲445.79 ▲0.90104.52 ▼5.6993.52 ▲49.61
Posts /wp-admin/edit.php2,118 ▲292.00 ▼0.0533.59 ▼6.3541.52 ▲7.06
Add New Post /wp-admin/post-new.php1,539 ▲623.10 ▼0.37714.05 ▲107.5155.88 ▼0.75
Media Library /wp-admin/upload.php1,417 ▲354.20 ▼0.0497.76 ▼4.5283.11 ▲40.82
自动定时发布 /wp-admin/admin.php?page=DX-auto-publish8762.0626.5779.79
daxiawp主题商城 /wp-admin/admin.php?page=daxiawp_theme1,0504.39130.4053.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/dx-auto-publish/dx-auto-publish.php+64
    date_default_timezone_set(): Timezone ID '' is invalid
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=daxiawp_theme
    • > Notice in wp-content/plugins/dx-auto-publish/dx-auto-publish.php+64
    date_default_timezone_set(): Timezone ID '' is invalid
    • > GET request to /wp-admin/admin.php?page=DX-auto-publish
    • > Notice in wp-content/plugins/dx-auto-publish/form.php+2
    Undefined index: update_draft
    • > GET request to /wp-admin/admin.php?page=DX-auto-publish
    • > Notice in wp-content/plugins/dx-auto-publish/form.php+7
    Undefined index: delete_draft

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined index: update_draft in wp-content/plugins/dx-auto-publish/form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dx-auto-publish/dx-auto-publish.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dx-auto-publish/theme.php:4
    • > PHP Notice
      Undefined index: delete_draft in wp-content/plugins/dx-auto-publish/form.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dx-auto-publish/form.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=DX-auto-publish
    • > Network (severe)
    https://wpa.qq.com/pa?p=2:1683134075:44 - Failed to load resource: the server responded with a status of 404 ()
  • 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/gctm?di=454435&uuid=0d9841855177d320&dri=0&dis=0&dai=0&ps=136x64&enu=encoding&exps=110011&ant=0&psi=0bbf0b6b1d7b4707&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1696444720333&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=16&cce=true&cec=UTF-8&tlm=1696444720&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=1696444720, 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/gctm?di=454451&uuid=3ac5aacae4b8e86b&dri=0&dis=0&dai=0&ps=136x386&enu=encoding&exps=110011&ant=0&psi=0bbf0b6b1d7b4707&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1696444720333&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=16&cce=true&cec=UTF-8&tlm=1696444723&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=1696444723, 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/gctm?di=454453&uuid=56c3f4e4a4b8d386&dri=0&dis=0&dai=0&ps=136x708&enu=encoding&exps=110011&ant=0&psi=0bbf0b6b1d7b4707&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1696444720333&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=16&cce=true&cec=UTF-8&tlm=1696444723&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=1696444723, 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/gctm?di=454454&uuid=f3c77be5a8a09d83&dri=0&dis=0&dai=0&ps=388x64&enu=encoding&exps=110011&ant=0&psi=0bbf0b6b1d7b4707&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1696444720333&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=16&cce=true&cec=UTF-8&tlm=1696444723&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=1696444724, 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/gctm?di=454455&uuid=a9d89bbd11cd52bd&dri=0&dis=0&dai=0&ps=388x386&enu=encoding&exps=110011&ant=0&psi=0bbf0b6b1d7b4707&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1696444720333&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=1038x699&cfv=0&cpl=0&chi=16&cce=true&cec=UTF-8&tlm=1696444724&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=1696444724, 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/gctm?di=454457&uuid=731cc548b4c680b9&dri=0&dis=0&dai=0&ps=388x708&enu=encoding&exps=110011&ant=0&psi=0bbf0b6b1d7b4707&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1696444720333&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=1038x699&cfv=0&cpl=0&chi=16&cce=true&cec=UTF-8&tlm=1696444724&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=1696444725, 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/gctm?di=454459&uuid=d0ce02753c6fec31&dri=0&dis=0&dai=0&ps=640x64&enu=encoding&exps=110011&ant=0&psi=0bbf0b6b1d7b4707&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1696444720333&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=1038x726&cfv=0&cpl=0&chi=16&cce=true&cec=UTF-8&tlm=1696444724&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=1696444725, 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/gctm?di=454461&uuid=cdc8bd7e4c48a561&dri=0&dis=0&dai=0&ps=640x386&enu=encoding&exps=110011&ant=0&psi=0bbf0b6b1d7b4707&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1696444720333&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=1038x951&cfv=0&cpl=0&chi=16&cce=true&cec=UTF-8&tlm=1696444725&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=1696444725, 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/gctm?di=454462&uuid=d92291e2f196eb5b&dri=0&dis=0&dai=0&ps=640x708&enu=encoding&exps=110011&ant=0&psi=0bbf0b6b1d7b4707&dcb=___adblockplus_&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tpr=1696444720333&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=1038x951&cfv=0&cpl=0&chi=16&cce=true&cec=UTF-8&tlm=1696444725&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=1696444726, 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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === dx-auto-publish === )
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "DX-auto-publish" version 1.2
62 characters long description:
Automatic batch timing post. 自动批量定时发布文章。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin114 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33015114

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.89KB1.01KB0.00%