72% fat-rat-collect

Code Review | 胖鼠采集(Fat Rat Collect) 微信知乎简书腾讯新闻列表分页采集, 还有自动采集、自动发布、自动标签、等多项功能。开源插件

WordPress plugin 胖鼠采集(Fat Rat Collect) 微信知乎简书腾讯新闻列表分页采集, 还有自动采集、自动发布、自动标签、等多项功能。开源插件 scored72%from 54 tests.

About plugin

  • Plugin page: fat-rat-collect
  • Plugin version: 2.6.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Dec 27, 2018
  • Latest release: Sep 8, 2023
  • Number of updates: 177
  • Update frequency: every 9.7 days
  • Top authors: fbtopcn (100%)

Code review

54 tests

User reviews

43 reviews

Install metrics

1,000+ active /56,591 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▲0.62ms] 75% from 4 tests

Server-side resources used by 胖鼠采集(Fat Rat Collect) 微信知乎简书腾讯新闻列表分页采集, 还有自动采集、自动发布、自动标签、等多项功能。开源插件
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 3,056.30ms on /wp-admin/admin.php?page=frc-spider)
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2841.96 ▲0.05
Dashboard /wp-admin3.57 ▲0.2751.12 ▲3.07
Posts /wp-admin/edit.php3.62 ▲0.2651.19 ▼2.35
Add New Post /wp-admin/post-new.php6.09 ▲0.2098.68 ▲5.49
Media Library /wp-admin/upload.php3.43 ▲0.2040.55 ▲1.71
采集中心 /wp-admin/admin.php?page=frc-spider3.733,056.30
数据桶中心 /wp-admin/admin.php?page=frc-data3.4135.82
胖鼠工具箱 /wp-admin/admin.php?page=frc-kit3.4137.08
添加/修改(配置) /wp-admin/admin.php?page=frc-options-add-edit3.4135.98
数据列表 /wp-admin/admin.php?page=frc-data-detail3.4133.05
配置中心 /wp-admin/admin.php?page=frc-options3.4137.37
Debugging /wp-admin/admin.php?page=frc-debugging3.4135.37

Server storage [IO: ▲4.86MB] [DB: ▲0.08MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 642 new files
Database: 2 new tables, 11 new options
New tables
wp_frc_options
wp_frc_post
New WordPress options
widget_recent-comments
frc_validation_notice
widget_theysaidso_widget
can_compress_scripts
fat_rat_collect_api_code
frc_install_time
widget_recent-posts
theysaidso_admin_options
frc_db_version
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by 胖鼠采集(Fat Rat Collect) 微信知乎简书腾讯新闻列表分页采集, 还有自动采集、自动发布、自动标签、等多项功能。开源插件
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.25 ▼0.241.73 ▲0.0240.35 ▼18.02
Dashboard /wp-admin2,240 ▲635.56 ▼0.1180.95 ▼16.0985.87 ▲42.52
Posts /wp-admin/edit.php2,142 ▲422.00 ▼0.0738.18 ▼4.4243.90 ▲6.72
Add New Post /wp-admin/post-new.php1,576 ▲5023.23 ▼0.09685.77 ▼14.7155.49 ▲0.34
Media Library /wp-admin/upload.php1,445 ▲424.18 ▼0.03105.24 ▲5.7777.10 ▲32.49
采集中心 /wp-admin/admin.php?page=frc-spider1,9091.8425.59182.54
数据桶中心 /wp-admin/admin.php?page=frc-data1,0811.9325.9847.27
胖鼠工具箱 /wp-admin/admin.php?page=frc-kit1,2671.8226.18118.74
添加/修改(配置) /wp-admin/admin.php?page=frc-options-add-edit1,2661.8328.17104.07
数据列表 /wp-admin/admin.php?page=frc-data-detail1,7472.8832.4760.51
配置中心 /wp-admin/admin.php?page=frc-options1,0881.9329.2064.63
Debugging /wp-admin/admin.php?page=frc-debugging1,0101.8226.1582.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_theysaidso_widget
    • fat_rat_collect_api_code
    • widget_recent-comments
    • can_compress_scripts
    • frc_report_permissions_time
    • frc_install_time
    • frc_validation_notice
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=frc-spider
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/fat-rat-collect/views/frc-spider.php
  • 244× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' not found in wp-content/plugins/fat-rat-collect/vendor/symfony/process/Pipes/WindowsPipes.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Cache\\Adapter\\Common\\PhpCachePool' not found in wp-content/plugins/fat-rat-collect/vendor/cache/adapter-common/AbstractCachePool.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/fat-rat-collect/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Cloner\\Stub' not found in wp-content/plugins/fat-rat-collect/vendor/symfony/var-dumper/Caster/EnumStub.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Flysystem\\Exception' not found in wp-content/plugins/fat-rat-collect/vendor/league/flysystem/src/FileExistsException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/fat-rat-collect/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'vierbergenlars\\LibJs\\JObject' not found in wp-content/plugins/fat-rat-collect/vendor/vierbergenlars/php-semver/src/vierbergenlars/LibJs/JSArray.php:29
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/fat-rat-collect/vendor/psr/cache/src/CacheItemInterface.php on line 104
    • > PHP Fatal error
      Uncaught Error: Interface 'Tightenco\\Collect\\Contracts\\Support\\CanBeEscapedWhenCastToString' not found in wp-content/plugins/fat-rat-collect/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' not found in wp-content/plugins/fat-rat-collect/vendor/symfony/process/Exception/RuntimeException.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: caiji, pangshu, seo

fat-rat-collect/fatratcollect.php 85% from 13 tests

The main PHP script in "胖鼠采集(Fat Rat Collect) 微信知乎简书腾讯新闻列表分页采集, 还有自动采集、自动发布、自动标签、等多项功能。开源插件" version 2.6.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 401 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("fat-rat-collect.php" instead of "fatratcollect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin65,959 lines of code in 583 files:
LanguageFilesBlank linesComment linesLines of code
PHP4467,69119,77742,079
CSS51,708339,272
Markdown551,99505,958
JavaScript221,3539734,657
JSON37103,469
HTML430280
YAML9291142
XML35053
Bourne Shell1171040
make1409

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity12.92
▷ Minimum class complexity1.00
▷ Maximum class complexity586.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces73
Interfaces67
Traits26
Classes335
▷ Abstract classes144.18%
▷ Concrete classes32195.82%
▷ Final classes4614.33%
Methods2,967
▷ Static methods56318.98%
▷ Public methods2,55986.25%
▷ Protected methods2087.01%
▷ Private methods2006.74%
Functions532
▷ Named functions20538.53%
▷ Anonymous functions32761.47%
Constants256
▷ Global constants5019.53%
▷ Class constants20680.47%
▷ Public constants16982.04%

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
11 PNG files occupy 0.21MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
logo.png10.23KB4.53KB▼ 55.73%
images/fat-rat-nav-v-yellow.png0.88KB0.68KB▼ 23.34%
images/fat-rat-kit.png0.89KB0.85KB▼ 4.70%
images/fat-rat-128x128.png8.08KB3.97KB▼ 50.86%
vendor/jaeger/querylist/logo.png15.24KB5.24KB▼ 65.62%