83% wumii-comment

Code Review | 无觅评论插件

WordPress plugin 无觅评论插件 scored83%from 54 tests.

About plugin

  • Plugin page: wumii-comment
  • Plugin version: 1.0.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.1-3.6
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Sep 30, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: wumii team (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,018 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
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.30ms] Passed 4 tests

A check of server-side resources used by 无觅评论插件
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.60 ▲2.33
Dashboard /wp-admin3.32 ▼0.0348.69 ▼12.32
Posts /wp-admin/edit.php3.37 ▲0.0147.45 ▼2.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.56 ▼13.47
Media Library /wp-admin/upload.php3.24 ▲0.0136.73 ▼1.03

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

无觅评论插件: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.191.88 ▲0.0643.69 ▲2.00
Dashboard /wp-admin2,209 ▲245.90 ▲1.0299.02 ▼16.5839.21 ▲2.88
Posts /wp-admin/edit.php2,086 ▼32.02 ▲0.0236.46 ▼3.6233.62 ▼1.84
Add New Post /wp-admin/post-new.php1,533 ▼023.12 ▼0.32671.48 ▲43.0158.24 ▼0.00
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0696.10 ▼6.1644.17 ▼0.90

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wumii-comment/wumii-comment.php on line 66
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wumii-comment/wumii-comment.php on line 66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/wumii-comment/comment.php:24
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wumii-comment/wumii-comment.php on line 66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wumii-comment/wumii-comment.php:68

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

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (支持用新浪微博、QQ、无觅账号登录,同时允许匿名评论), #2 (树状评论展示,并优先展示被赞次数多的高质量评论), #3 (自动同步评论到微博,同时智能聚合微博上的相关评论), #4 (热门评论排行,展现精华评论和积极发表评论的用户), #5 (内容丰富的用户资料卡片,让评论框变身互动社区)
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

wumii-comment/wumii-comment.php 92% from 13 tests

The main file in "无觅评论插件" v. 1.0.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected105 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22528105

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity9.00
▷ Minimum class complexity5.00
▷ Maximum class complexity13.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods872.73%
▷ Protected methods00.00%
▷ Private methods327.27%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.23MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png53.13KB28.11KB▼ 47.09%
screenshot-4.png63.33KB26.46KB▼ 58.23%
screenshot-5.png59.67KB24.67KB▼ 58.65%
screenshot-1.png11.70KB6.54KB▼ 44.10%
screenshot-3.png43.93KB19.30KB▼ 56.06%