84% realtimehot-weibo

Code Review | Realtimehot Weibo(微博热搜榜)

WordPress plugin Realtimehot Weibo(微博热搜榜) scored84%from 54 tests.

About plugin

  • Plugin page: realtimehot-weibo
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Feb 29, 2020
  • Latest release: Aug 12, 2023
  • Number of updates: 14
  • Update frequency: every 90.1 days
  • Top authors: shenyanzhi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /894 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.02MB] [CPU: ▼4.34ms] Passed 4 tests

Analyzing server-side resources used by Realtimehot Weibo(微博热搜榜)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.16 ▼5.90
Dashboard /wp-admin3.53 ▲0.231,220.16 ▲1,166.94
Posts /wp-admin/edit.php3.37 ▲0.0246.91 ▲1.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.36 ▼16.64
Media Library /wp-admin/upload.php3.24 ▲0.0137.00 ▲4.20

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Realtimehot Weibo(微博热搜榜)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲16914.46 ▲0.091.89 ▲0.1340.62 ▼3.86
Dashboard /wp-admin2,285 ▲1085.12 ▲0.23110.85 ▲0.3754.01 ▲8.28
Posts /wp-admin/edit.php2,089 ▲112.12 ▲0.1335.44 ▼0.5431.30 ▼3.56
Add New Post /wp-admin/post-new.php1,534 ▼023.28 ▲0.10669.71 ▼27.0855.56 ▼1.63
Media Library /wp-admin/upload.php1,391 ▲94.17 ▲0.02100.75 ▲3.6142.44 ▼0.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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 no errors were found, 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
Please fix the following items
  • 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/realtimehot-weibo/realtimehot-weibo.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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 your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
You can take inspiration from this readme.txt

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

This is the main PHP file of "Realtimehot Weibo(微博热搜榜)" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
140 characters long description:
在WordPress的仪表盘、小工具、文章、页面等地方加入微博热搜榜,随时随地 get 实时微博热搜,一键直达!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin117 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP114981
Markdown129036

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions6
▷ Named functions6100.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
3 PNG files occupy 0.28MB with 0.20MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png62.54KB14.15KB▼ 77.37%
screenshot-1.png154.91KB48.23KB▼ 68.86%
screenshot-2.png67.69KB18.46KB▼ 72.73%