84% apoyl-toutiaopush

Code Review | 今日头条搜索自动收录

WordPress plugin 今日头条搜索自动收录 scored84%from 54 tests.

About plugin

  • Plugin page: apoyl-toutiaopush
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 19, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 9
  • Update frequency: every 51.2 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,001 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.77ms] Passed 4 tests

Server-side resources used by 今日头条搜索自动收录
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.71 ▼2.80
Dashboard /wp-admin3.35 ▲0.0445.77 ▼4.08
Posts /wp-admin/edit.php3.46 ▲0.1049.52 ▲1.76
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.49 ▼5.58
Media Library /wp-admin/upload.php3.27 ▲0.0436.16 ▲1.37
settings /wp-admin/options-general.php?page=apoyl-toutiaopush-settings3.2433.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
apoyl-toutiaopush-settings
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by 今日头条搜索自动收录
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.34 ▼0.001.71 ▲0.0943.21 ▼5.71
Dashboard /wp-admin2,199 ▲195.59 ▼0.0391.21 ▼8.4138.37 ▼6.84
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0638.40 ▼2.4936.98 ▲0.19
Add New Post /wp-admin/post-new.php1,529 ▲322.98 ▲0.28608.51 ▼25.6548.43 ▼3.16
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0695.94 ▼9.8841.16 ▼1.74
settings /wp-admin/options-general.php?page=apoyl-toutiaopush-settings8662.0028.0930.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: scanningtips in wp-content/plugins/apoyl-toutiaopush/admin/partials/admin-display.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apoyl-toutiaopush/admin/partials/admin-display.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/apoyl-toutiaopush/public/partials/public-display.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt might help

apoyl-toutiaopush/apoyl-toutiaopush.php Passed 13 tests

"今日头条搜索自动收录" version 1.5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
96 characters long description:
实现文章推送到今日头条搜索里,让今日头条搜索第一时间抓取你的内容

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 plugin286 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1394142283
JavaScript1203

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods26
▷ Static methods311.54%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin