90% double-title

Code Review | 双标题

WordPress plugin 双标题 scored90%from 54 tests.

About plugin

  • Plugin page: double-title
  • Plugin version: 0.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: May 5, 2022
  • Latest release: Nov 3, 2022
  • Number of updates: 8
  • Update frequency: every 22.9 days
  • Top authors: wyzda2021 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,199 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.95ms] Passed 4 tests

Analyzing server-side resources used by 双标题
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.05 ▼5.64
Dashboard /wp-admin3.33 ▲0.0253.60 ▲1.30
Posts /wp-admin/edit.php3.38 ▲0.0254.68 ▲7.21
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.94 ▼3.60
Media Library /wp-admin/upload.php3.26 ▲0.0339.64 ▼3.85
双标题 /wp-admin/options-general.php?page=double-title-setting3.2330.77

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
double_title_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

双标题: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.431.89 ▼0.2246.66 ▲3.38
Dashboard /wp-admin2,202 ▲285.62 ▲0.0190.59 ▼0.6845.21 ▲6.87
Posts /wp-admin/edit.php2,104 ▲72.00 ▲0.0238.69 ▲1.9942.84 ▲8.63
Add New Post /wp-admin/post-new.php1,529 ▼15123.49 ▲1.55683.37 ▲19.9448.57 ▼5.97
Media Library /wp-admin/upload.php1,404 ▲44.08 ▼0.0999.54 ▼5.4247.95 ▲3.13
双标题 /wp-admin/options-general.php?page=double-title-setting1,1022.0429.61118.33

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: double title

double-title/double-title.php Passed 13 tests

This is the main PHP file of "双标题" version 0.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
108 characters long description:
支持文章双标题显示,自定义双标题显示模板,支持手动或自动设置文章副标题。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin897 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP443166780
JavaScript439117

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity31.00
▷ Minimum class complexity3.00
▷ Maximum class complexity81.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods24100.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin