84% weibo-like

Code Review | Sina Weibo Like Button 新浪微博赞按钮

WordPress plugin Sina Weibo Like Button 新浪微博赞按钮 scored84%from 54 tests.

About plugin

  • Plugin page: weibo-like
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-3.5
  • WordPress version: 6.3.1
  • First release: Jan 14, 2013
  • Latest release: May 9, 2015
  • Number of updates: 16
  • Update frequency: every 90.8 days
  • Top authors: Sparanoid (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /5,945 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.34ms] Passed 4 tests

This is a short check of server-side resources used by Sina Weibo Like Button 新浪微博赞按钮
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.52 ▼2.10
Dashboard /wp-admin3.34 ▼0.0146.15 ▼13.39
Posts /wp-admin/edit.php3.40 ▲0.0548.83 ▲0.72
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.13 ▼18.57
Media Library /wp-admin/upload.php3.26 ▲0.0337.12 ▲4.20

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sina Weibo Like Button 新浪微博赞按钮
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.29 ▼0.304.22 ▲2.4837.84 ▼2.10
Dashboard /wp-admin2,195 ▲275.62 ▲0.0981.97 ▼11.3141.52 ▼4.16
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0033.99 ▼2.1332.95 ▼4.72
Add New Post /wp-admin/post-new.php1,528 ▲223.17 ▼0.62655.62 ▼61.0660.12 ▲4.72
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0297.80 ▼4.1244.63 ▼1.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/weibo-like/weibo-like.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/weibo-like/includes/opengraph/opengraph.php:38

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 issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

weibo-like/weibo-like.php Passed 13 tests

The primary PHP file in "Sina Weibo Like Button 新浪微博赞按钮" version 1.0.3 is used by WordPress to initiate all plugin functionality
40 characters long description:
Adds Sina Weibo Like button on your site

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
Everything looks great! No dangerous files found in this plugin209 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP254116209

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.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