89% imgspider

Code Review | IMGspider - 图片采集抓取插件

WordPress plugin IMGspider - 图片采集抓取插件 scored89%from 54 tests.

About plugin

  • Plugin page: imgspider
  • Plugin version: 2.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: May 17, 2019
  • Latest release: Oct 19, 2023
  • Number of updates: 36
  • Update frequency: every 44.9 days
  • Top authors: wbolt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /37,093 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼1.66ms] Passed 4 tests

This is a short check of server-side resources used by IMGspider - 图片采集抓取插件
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3443.43 ▲5.94
Dashboard /wp-admin3.65 ▲0.3146.36 ▼10.64
Posts /wp-admin/edit.php3.77 ▲0.4150.76 ▲3.33
Add New Post /wp-admin/post-new.php6.26 ▲0.3794.63 ▼2.42
Media Library /wp-admin/upload.php3.58 ▲0.3435.19 ▲3.10
图片蜘蛛 /wp-admin/options-general.php?page=imgspider_pack3.6139.95

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by IMGspider - 图片采集抓取插件
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.14 ▼0.211.91 ▲0.4041.42 ▲0.04
Dashboard /wp-admin2,200 ▲195.57 ▼0.0490.62 ▼9.0647.48 ▲8.30
Posts /wp-admin/edit.php2,105 ▲51.97 ▼0.0339.63 ▲4.1140.67 ▲5.49
Add New Post /wp-admin/post-new.php1,546 ▲1823.49 ▲0.39640.83 ▼20.8967.05 ▲9.22
Media Library /wp-admin/upload.php1,402 ▲84.22 ▼0.0195.00 ▼5.5447.83 ▲1.83
图片蜘蛛 /wp-admin/options-general.php?page=imgspider_pack1,9237.2997.90201.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: There were no tags found
Please take inspiration from this readme.txt

imgspider/index.php 85% from 13 tests

"IMGspider - 图片采集抓取插件" version 2.3.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("imgspider.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 224 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected2,372 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP105411992,355
JavaScript904413
CSS2063
HTML1001

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 151)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity91.83
▷ Minimum class complexity24.00
▷ Maximum class complexity167.00
Average method complexity9.68
▷ Minimum method complexity1.00
▷ Maximum method complexity151.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods61
▷ Static methods61100.00%
▷ Public methods5996.72%
▷ Protected methods00.00%
▷ Private methods23.28%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants9
▷ Global constants9100.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
4 compressed PNG files occupy 0.09MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/imgspider_pro_icon.png24.64KB24.63KB0.02%
assets/img/icons.png28.97KB28.95KB0.06%
setting/assets/img/icons.abf3bf80.png28.97KB28.95KB0.06%
assets/img/imgspider_icon.png10.23KB10.23KB0.02%