90% zhanzhangb-share

Code Review | zhanzhangb-share

WordPress plugin zhanzhangb-share scored90%from 54 tests.

About plugin

  • Plugin page: zhanzhangb-share
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 23, 2020
  • Latest release: Apr 23, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: ywtywt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,481 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.47ms] Passed 4 tests

A check of server-side resources used by zhanzhangb-share
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.83 ▼5.69
Dashboard /wp-admin3.39 ▲0.0949.73 ▼3.91
Posts /wp-admin/edit.php3.50 ▲0.1553.84 ▲0.95
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.23 ▼17.21
Media Library /wp-admin/upload.php3.31 ▲0.0838.66 ▲3.14
站长帮 - 分享插件 /wp-admin/options-general.php?page=zhanzhangb_share3.2831.59

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
zhanzhangb_share_location
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for zhanzhangb-share
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.64 ▼0.665.47 ▲3.3243.68 ▲1.02
Dashboard /wp-admin2,207 ▲195.83 ▲0.9599.82 ▼12.4143.50 ▼1.58
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0439.59 ▼1.1939.80 ▲3.80
Add New Post /wp-admin/post-new.php1,546 ▲1618.11 ▼0.37676.70 ▲31.0376.13 ▲22.36
Media Library /wp-admin/upload.php1,395 ▲104.24 ▲0.06103.38 ▲0.3745.08 ▼5.24
站长帮 - 分享插件 /wp-admin/options-general.php?page=zhanzhangb_share8672.0524.3168.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: weixin, share

zhanzhangb-share/zhanzhangb-share.php 92% from 13 tests

Analyzing the main PHP file in "zhanzhangb-share" version 1.0.0
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin582 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP53637376
JavaScript310163
CSS101543

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity19.50
▷ Minimum class complexity9.00
▷ Maximum class complexity30.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2076.92%
▷ Protected methods00.00%
▷ Private methods623.08%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin