83% bosima-wechat-page-sharing

Code Review | Bosima WeChat Page Sharing

WordPress plugin Bosima WeChat Page Sharing scored83%from 54 tests.

About plugin

  • Plugin page: bosima-wechat-pag...
  • Plugin version: 0.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2017
  • Latest release: Aug 24, 2019
  • Number of updates: 37
  • Update frequency: every 22.5 days
  • Top authors: bossma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /7,639 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.29ms] Passed 4 tests

Server-side resources used by Bosima WeChat Page Sharing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0854.96 ▲13.58
Dashboard /wp-admin3.44 ▲0.0948.59 ▼11.26
Posts /wp-admin/edit.php3.55 ▲0.1949.40 ▼3.83
Add New Post /wp-admin/post-new.php6.02 ▲0.1388.20 ▼11.97
Media Library /wp-admin/upload.php3.36 ▲0.1338.87 ▲1.91
微信分享设置 /wp-admin/options-general.php?page=wechat-appid-config3.3039.31

Server storage [IO: ▲0.80MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/bosima-wechat-page-sharing/" and "wp-content/uploads/"
    • (new file) wp-content/bps-wechat/config/.empty
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bosima WeChat Page Sharing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.46 ▼0.9010.88 ▲9.3542.34 ▼0.72
Dashboard /wp-admin2,196 ▲155.50 ▼0.1982.80 ▼18.3446.05 ▲7.73
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0338.16 ▼2.3142.10 ▲6.44
Add New Post /wp-admin/post-new.php1,535 ▼023.11 ▲0.10654.31 ▼28.6048.36 ▼16.32
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.1195.01 ▼7.2651.61 ▲9.42
微信分享设置 /wp-admin/options-general.php?page=wechat-appid-config9442.0424.6347.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+89
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_page_title
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+90
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_page_description
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+91
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_tag_title
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+92
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_tag_description
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+93
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_search_title
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+94
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_search_description
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+95
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_archive_title
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+96
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_archive_description
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+97
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_img_option
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+98
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_home_title
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+99
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_home_img_useicon
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+100
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_home_description
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+101
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_single_description
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+102
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_single_title
    • > GET request to /wp-admin/options-general.php?page=wechat-appid-config
    • > Notice in wp-content/plugins/bosima-wechat-page-sharing/sharing-admin.php+103
    Undefined property: Bosima_WeChat_AccessConfig::$sharing_category_title

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: wechat, sharing

bosima-wechat-page-sharing/sharing.php 85% from 13 tests

"Bosima WeChat Page Sharing" version 0.3.4'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 ("bosima-wechat-page-sharing.php" instead of "sharing.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 236 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin856 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6128126758
PO File1374198

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity18.00
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods1446.67%
▷ Public methods1653.33%
▷ Protected methods00.00%
▷ Private methods1446.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.48MB with 0.33MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png191.23KB64.80KB▼ 66.11%
screenshot-1.png169.86KB49.03KB▼ 71.14%
screenshot-2.png135.07KB44.63KB▼ 66.96%