84% weibo2wp

Code Review | weibo2wp plugin

WordPress plugin weibo2wp plugin scored84%from 54 tests.

About plugin

  • Plugin page: weibo2wp
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Jul 24, 2013
  • Latest release: Jan 7, 2014
  • Number of updates: 15
  • Update frequency: every 11.2 days
  • Top authors: donggua211 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,864 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by weibo2wp plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.29 ▲1.98
Dashboard /wp-admin3.33 ▲0.0346.80 ▼2.47
Posts /wp-admin/edit.php3.45 ▲0.0949.90 ▲3.33
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.64 ▼10.85
Media Library /wp-admin/upload.php3.25 ▲0.0234.33 ▲4.31
Weibo2wp /wp-admin/admin.php?page=weibo2wp3.2731.50
Settings /wp-admin/admin.php?page=weibo2wp_settings3.2734.49

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by weibo2wp plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.33 ▼1.041.59 ▲0.1140.84 ▲3.33
Dashboard /wp-admin2,245 ▲545.85 ▲0.9999.11 ▼1.8039.41 ▼4.22
Posts /wp-admin/edit.php2,133 ▲442.21 ▲0.1938.41 ▼0.7734.90 ▼2.61
Add New Post /wp-admin/post-new.php1,552 ▲3823.46 ▲5.81664.74 ▼5.7438.20 ▼21.66
Media Library /wp-admin/upload.php1,427 ▲394.30 ▲0.0297.66 ▼0.3243.77 ▼2.40
Weibo2wp /wp-admin/admin.php?page=weibo2wp8191.8324.7825.18
Settings /wp-admin/admin.php?page=weibo2wp_settings8491.8024.5425.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/weibo2wp/weibo2wp-ajax.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/weibo2wp/weibo2wp-functions.php:85

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
No tags were found

weibo2wp/weibo2wp.php Passed 13 tests

"weibo2wp plugin" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
118 characters long description:
The goal of this plugin is to help people Synchronize their Weibo( which is a very popular light blog in China) to WP.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,512 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP154004881,393
CSS13375
JavaScript19044

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.56
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods76
▷ Static methods45.26%
▷ Public methods6788.16%
▷ Protected methods00.00%
▷ Private methods911.84%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin