83% icollect

Code Review | 爱采集数据采集和发布插件

WordPress plugin 爱采集数据采集和发布插件 scored83%from 54 tests.

About plugin

  • Plugin page: icollect
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Sep 4, 2020
  • Latest release: Sep 4, 2020
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: devenc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,159 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▲1.50ms] Passed 4 tests

Server-side resources used by 爱采集数据采集和发布插件
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.90 ▼0.49
Dashboard /wp-admin3.39 ▲0.0950.88 ▲3.53
Posts /wp-admin/edit.php3.51 ▲0.1551.05 ▲3.61
Add New Post /wp-admin/post-new.php5.97 ▲0.0994.06 ▲0.60
Media Library /wp-admin/upload.php3.32 ▲0.0938.07 ▲2.35

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

爱采集数据采集和发布插件: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5813.14 ▼1.621.68 ▼0.2344.78 ▲4.26
Dashboard /wp-admin2,224 ▲334.87 ▼0.0099.03 ▼11.9187.22 ▲46.32
Posts /wp-admin/edit.php2,104 ▲152.00 ▼0.0140.41 ▲5.0041.20 ▲5.50
Add New Post /wp-admin/post-new.php1,553 ▲3618.16 ▲0.52633.47 ▼1.3560.50 ▲8.02
Media Library /wp-admin/upload.php1,400 ▲154.17 ▼0.0697.99 ▼3.5881.36 ▲38.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/icollect/setting.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/icollect/Wordpress.php:257

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: No tags were detected
The official readme.txt is a good inspiration

icollect/Wordpress.php 85% from 13 tests

The main PHP script in "爱采集数据采集和发布插件" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("icollect.php" instead of "Wordpress.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected598 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47233525
CSS10073

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity25.00
▷ Minimum class complexity5.00
▷ Maximum class complexity49.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods512.20%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/logo.png15.51KB7.48KB▼ 51.77%
assets/logo-20.png17.54KB0.52KB▼ 97.01%
logo-20.png17.54KB0.52KB▼ 97.01%
assets/screenshot-1.png58.04KB22.44KB▼ 61.33%