68% dfoxw-wechatgrab

Code Review | DFOXW-WechatGrab 微信采集助手

WordPress plugin DFOXW-WechatGrab 微信采集助手 scored68%from 54 tests.

About plugin

  • Plugin page: dfoxw-wechatgrab
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2017
  • Latest release: Apr 18, 2017
  • Number of updates: 6
  • Update frequency: every 3.8 days
  • Top authors: hoythan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,513 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.91ms] Passed 4 tests

This is a short check of server-side resources used by DFOXW-WechatGrab 微信采集助手
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0654.39 ▲7.06
Dashboard /wp-admin3.35 ▲0.0547.91 ▲0.51
Posts /wp-admin/edit.php3.40 ▲0.0551.71 ▼1.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0586.04 ▼10.77
Media Library /wp-admin/upload.php3.27 ▲0.0538.38 ▼0.10
↳ 微信采集助手 /wp-admin/admin.php?page=wechatgrab3.2239.33
DFOXWP 设置 /wp-admin/admin.php?page=dfox_wp_admin3.4936.09

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: 1 new table, 6 new options
New tables
wp_dfoxwgrab
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

DFOXW-WechatGrab 微信采集助手: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲18613.55 ▼1.075.60 ▲3.8744.67 ▲2.63
Dashboard /wp-admin2,244 ▲444.86 ▼0.95110.74 ▲8.0249.26 ▲5.35
Posts /wp-admin/edit.php2,120 ▲202.04 ▲0.0338.84 ▼0.4243.00 ▲7.66
Add New Post /wp-admin/post-new.php1,564 ▲1023.29 ▼1.36646.77 ▼70.5964.85 ▼2.20
Media Library /wp-admin/upload.php1,423 ▲234.23 ▼0.0296.50 ▼12.0952.60 ▲4.21
↳ 微信采集助手 /wp-admin/admin.php?page=wechatgrab1,5482.4730.84110.14
DFOXWP 设置 /wp-admin/admin.php?page=dfox_wp_admin8911.7225.6662.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_dfoxwgrab
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_style() in wp-content/plugins/dfoxw-wechatgrab/dfox_wp/dfoxwpsuite.class.php:17
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-walker-category-checklist.php): failed to open stream: No such file or directory in wp-content/plugins/dfoxw-wechatgrab/class/dfoxw.walker.category.checklist.class.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/dfoxw-wechatgrab/dfoxw_wechatgrab.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dfoxw-wechatgrab/admin/load.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-walker-category-checklist.php' (include_path='.:/usr/share/php') in wp-content/plugins/dfoxw-wechatgrab/class/dfoxw.walker.category.checklist.class.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dfoxw-wechatgrab/dfox_wp/load.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_cache_get() in wp-content/plugins/dfoxw-wechatgrab/desk/load.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dfoxw-wechatgrab/class/dfoxw.walker.category.checklist.class.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=dfox_wp_admin
    • > Javascript (severe) in unknown
    /wp-content/plugins/dfoxw-wechatgrab/dfox_wp/dfoxwp.min.js?ver=6.3.1 0:114 Uncaught TypeError: Cannot read properties of undefined (reading 'split')

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
6 plugin tags: wechat, n4b, nnnn, n4bw, grab...

dfoxw-wechatgrab/dfoxw_wechatgrab.php 92% from 13 tests

The main PHP script in "DFOXW-WechatGrab 微信采集助手" version 1.1.6 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("dfoxw-wechatgrab.php" instead of "dfoxw_wechatgrab.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,809 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP141273531,713
Sass11062
JavaScript512732
CSS2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity47.00
▷ Minimum class complexity5.00
▷ Maximum class complexity113.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods57
▷ Static methods00.00%
▷ Public methods4578.95%
▷ Protected methods11.75%
▷ Private methods1119.30%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin