74% apoyl-bingpush

Code Review | [凹凸曼]文章自动推送Bing

WordPress plugin [凹凸曼]文章自动推送Bing scored74%from 54 tests.

About plugin

  • Plugin page: apoyl-bingpush
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Sep 24, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 9
  • Update frequency: every 47.3 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,079 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.04ms] Passed 4 tests

This is a short check of server-side resources used by [凹凸曼]文章自动推送Bing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.05 ▲0.45
Dashboard /wp-admin3.37 ▲0.0647.19 ▼1.97
Posts /wp-admin/edit.php3.48 ▲0.1252.00 ▲4.39
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.77 ▼4.16
Media Library /wp-admin/upload.php3.29 ▲0.0635.60 ▼2.46
settings /wp-admin/options-general.php?page=apoyl-bingpush-settings3.2630.77

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 26 new files
Database: 1 new table, 8 new options
New tables
wp_apoyl_bingpush
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
apoyl-bingpush-settings
widget_recent-comments
apoyl_bingpush_db_version
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for [凹凸曼]文章自动推送Bing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲11313.52 ▼0.848.65 ▲6.7538.51 ▼9.07
Dashboard /wp-admin2,202 ▲285.62 ▲0.0792.78 ▼0.6642.24 ▼1.10
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0538.99 ▼0.5136.37 ▼2.59
Add New Post /wp-admin/post-new.php1,532 ▲623.08 ▼0.17577.78 ▼69.1853.68 ▼5.38
Media Library /wp-admin/upload.php1,407 ▲104.28 ▲0.1195.71 ▼3.4140.11 ▼2.19
settings /wp-admin/options-general.php?page=apoyl-bingpush-settings8581.9925.1226.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_apoyl_bingpush
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • apoyl_bingpush_db_version
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/apoyl-bingpush/public/partials/apoyl-bingpush-public-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apoyl-bingpush/admin/partials/apoyl-bingpush-admin-display.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: url, seo, bing

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

The main PHP file in "[凹凸曼]文章自动推送Bing" ver. 1.6.0 adds more information about the plugin and also serves as the entry point for this plugin
74 characters long description:
实现文章内容推送到Bing里,让Bing第一时间抓取你的内容

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin442 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP14105150439
JavaScript1203

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods35
▷ Static methods411.43%
▷ Public methods2982.86%
▷ Protected methods00.00%
▷ Private methods617.14%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/bing.png16.19KB1.62KB▼ 89.99%