78% weibo-tuchuang

Code Review | WeiBo TuChuang

WordPress plugin WeiBo TuChuang scored78%from 54 tests.

About plugin

  • Plugin page: weibo-tuchuang
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8
  • WordPress version: 6.3.1
  • First release: Dec 9, 2013
  • Latest release: Dec 17, 2013
  • Number of updates: 9
  • Update frequency: every 1.0 days
  • Top authors: shuangca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,440 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.69ms] Passed 4 tests

An overview of server-side resources used by WeiBo TuChuang
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.15 ▼4.69
Dashboard /wp-admin3.32 ▲0.0244.79 ▼8.01
Posts /wp-admin/edit.php3.37 ▲0.0147.15 ▼2.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.90 ▼19.15
Media Library /wp-admin/upload.php3.24 ▲0.0133.49 ▼1.50
微博图床 /wp-admin/options-general.php?page=weibo-tuchuang3.1828.69

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WeiBo TuChuang
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.61 ▼0.981.74 ▼0.0742.59 ▲0.40
Dashboard /wp-admin2,212 ▲275.91 ▲0.02110.77 ▲5.2545.25 ▲5.20
Posts /wp-admin/edit.php2,090 ▲12.04 ▼0.0139.27 ▼0.6841.03 ▲5.77
Add New Post /wp-admin/post-new.php1,545 ▲2618.62 ▼4.79603.75 ▼63.8352.43 ▲3.16
Media Library /wp-admin/upload.php1,392 ▲14.30 ▲0.0897.87 ▼3.7947.22 ▲4.48
微博图床 /wp-admin/options-general.php?page=weibo-tuchuang7822.0124.5251.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=weibo-tuchuang
    • > User deprecated in wp-includes/functions.php+5453
    Function get_settings is deprecated since version 2.1.0! Use get_option() instead.

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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/weibo-tuchuang/weibo-tuchuang.php:30

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Contributors not specified
  • Contributors: No tags were detected
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "WeiBo TuChuang" version 1.2
72 characters long description:
在文章发布页面增加微博上传功能,使用微博作为图床

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
No dangerous file extensions were detected1,525 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22731,5941,454
JavaScript110069
CSS1002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity48.00
▷ Minimum class complexity1.00
▷ Maximum class complexity103.00
Average method complexity1.99
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods143
▷ Static methods10.70%
▷ Public methods14097.90%
▷ Protected methods32.10%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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