84% wp2csdnblog

Code Review | WP2CSDNBlog

WordPress plugin WP2CSDNBlog scored84%from 54 tests.

About plugin

  • Plugin page: wp2csdnblog
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.5.1
  • WordPress version: 6.3.1
  • First release: May 12, 2015
  • Latest release: May 4, 2016
  • Number of updates: 19
  • Update frequency: every 18.9 days
  • Top authors: xhhjin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,657 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
This plugin's installer ran successfully

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

A check of server-side resources used by WP2CSDNBlog
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.73 ▲1.87
Dashboard /wp-admin3.34 ▲0.0354.87 ▼0.02
Posts /wp-admin/edit.php3.39 ▲0.0350.18 ▼0.58
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.08 ▼27.25
Media Library /wp-admin/upload.php3.26 ▲0.0338.15 ▼2.37
WP2CSDNBlog /wp-admin/options-general.php?page=WP2CSDNBlog3.2337.86

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP2CSDNBlog: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.34 ▼0.052.16 ▼0.2145.04 ▼3.13
Dashboard /wp-admin2,202 ▲285.64 ▲0.1394.24 ▼1.6042.40 ▲2.22
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0539.05 ▼0.1433.09 ▼7.90
Add New Post /wp-admin/post-new.php1,531 ▼323.10 ▲4.97633.55 ▼13.7860.30 ▼5.83
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.0799.63 ▼9.8544.60 ▲1.55
WP2CSDNBlog /wp-admin/options-general.php?page=WP2CSDNBlog9372.0124.6471.74

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp2csdnblog/wp2csdnblog.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: wp2csdnblog, csdn

wp2csdnblog/wp2csdnblog.php Passed 13 tests

The main PHP file in "WP2CSDNBlog" ver. 1.5 adds more information about the plugin and also serves as the entry point for this plugin
105 characters long description:
同步发布 WordPress 日志到 CSDN 博客,也可用在所有支持 Metaweblog API 的博客系统中

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,807 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32411,0602,807

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity72.50
▷ Minimum class complexity12.00
▷ Maximum class complexity144.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods58
▷ Static methods00.00%
▷ Public methods58100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected