79% spider-analyser

Code Review | Spider Analyser - WordPress搜索引擎蜘蛛分析插件

WordPress plugin Spider Analyser - WordPress搜索引擎蜘蛛分析插件 scored79%from 54 tests.

About plugin

  • Plugin page: spider-analyser
  • Plugin version: 1.3.11
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jul 10, 2020
  • Latest release: Mar 24, 2023
  • Number of updates: 30
  • Update frequency: every 33.2 days
  • Top authors: wbolt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /90,049 total downloads

Benchmarks

Plugin footprint 65% 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.46MB] [CPU: ▼5.77ms] Passed 4 tests

Analyzing server-side resources used by Spider Analyser - WordPress搜索引擎蜘蛛分析插件
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4742.71 ▼1.13
Dashboard /wp-admin3.79 ▲0.4453.53 ▼10.16
Posts /wp-admin/edit.php3.90 ▲0.5447.99 ▼2.46
Add New Post /wp-admin/post-new.php6.37 ▲0.4882.73 ▼9.34
Media Library /wp-admin/upload.php3.71 ▲0.4838.43 ▲8.22

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 40 new files
Database: 7 new tables, 8 new options
New tables
wp_wb_spider_post
wp_wb_spider_visit
wp_wb_spider_log
wp_wb_spider_post_link
wp_wb_spider
wp_wb_spider_ip
wp_wb_spider_sum
New WordPress options
widget_recent-comments
widget_recent-posts
wb_spider_analyser_db_ver
widget_theysaidso_widget
sync_wb_spider
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Spider Analyser - WordPress搜索引擎蜘蛛分析插件
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9714.26 ▼0.171.72 ▲0.0143.12 ▼2.90
Dashboard /wp-admin2,249 ▲755.52 ▼0.0585.75 ▼1.8189.93 ▲48.80
Posts /wp-admin/edit.php2,154 ▲542.00 ▲0.0535.12 ▼2.4741.59 ▲4.56
Add New Post /wp-admin/post-new.php1,567 ▲3923.48 ▲0.45742.89 ▲82.1853.92 ▲0.22
Media Library /wp-admin/upload.php1,448 ▲484.19 ▲0.0295.65 ▼8.7583.42 ▲36.90
文章爬取 /wp-admin/admin.php?page=wp_spider_analyser#/post1,7586.5990.44159.64
插件设置 /wp-admin/admin.php?page=wp_spider_analyser#/setting1,6416.2777.89128.36
访问路径 /wp-admin/admin.php?page=wp_spider_analyser#/path1,3298.46169.36102.97
蜘蛛日志 /wp-admin/admin.php?page=wp_spider_analyser#/log1,7237.0177.11109.14
蜘蛛列表 /wp-admin/admin.php?page=wp_spider_analyser#/list1,6786.6683.03118.66
蜘蛛概况 /wp-admin/admin.php?page=wp_spider_analyser#/home1,36910.81180.2497.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 7 tables
    • wp_wb_spider_post
    • wp_wb_spider_sum
    • wp_wb_spider_ip
    • wp_wb_spider_visit
    • wp_wb_spider_log
    • wp_wb_spider
    • wp_wb_spider_post_link
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wb_spider_analyser_db_ver
    • sync_wb_spider
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: mj12bot, bytespider, googlebot, semrushbot, spider analyser...

spider-analyser/index.php 85% from 13 tests

"Spider Analyser - WordPress搜索引擎蜘蛛分析插件" version 1.3.11's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("spider-analyser.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 198 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,196 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP136001983,094
SQL117673
JavaScript1825326
CSS2032
SVG1001

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 295)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity364.50
▷ Minimum class complexity69.00
▷ Maximum class complexity660.00
Average method complexity13.22
▷ Minimum method complexity1.00
▷ Maximum method complexity295.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods60
▷ Static methods60100.00%
▷ Public methods5998.33%
▷ Protected methods11.67%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants4
▷ Global constants4100.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.03MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tpl/assets/img/icons.abf3bf80.png28.97KB28.95KB0.06%