79% smart-seo-tool

Code Review | Smart SEO Tool - SEO优化插件

WordPress plugin Smart SEO Tool - SEO优化插件 scored79%from 54 tests.

About plugin

  • Plugin page: smart-seo-tool
  • Plugin version: 4.0.2
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2019
  • Latest release: Aug 16, 2023
  • Number of updates: 43
  • Update frequency: every 36.7 days
  • Top authors: wbolt (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

7,000+ active /83,067 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.80MB] [CPU: ▲3.17ms] Passed 4 tests

An overview of server-side resources used by Smart SEO Tool - SEO优化插件
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.8247.94 ▲6.71
Dashboard /wp-admin4.14 ▲0.8454.42 ▲2.04
Posts /wp-admin/edit.php4.19 ▲0.8457.95 ▲6.59
Add New Post /wp-admin/post-new.php6.66 ▲0.78100.60 ▼2.68
Media Library /wp-admin/upload.php4.00 ▲0.7744.66 ▲7.36

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 54 new files
Database: 2 new tables, 7 new options
New tables
wp_wb_sst_redirection_url
wp_wb_sst_broken_url
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
wb_sst_db_ver
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Smart SEO Tool - SEO优化插件: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.72 ▲0.541.67 ▼0.1747.61 ▲2.99
Dashboard /wp-admin2,230 ▲535.51 ▼0.1486.03 ▼7.1396.25 ▲55.82
Posts /wp-admin/edit.php2,147 ▲501.98 ▼0.0635.48 ▼2.4046.85 ▲11.37
Add New Post /wp-admin/post-new.php1,578 ▲5223.05 ▲0.08646.85 ▼48.1152.90 ▲0.43
Media Library /wp-admin/upload.php1,447 ▲474.27 ▲0.04106.86 ▼8.6072.62 ▲19.38
TDK优化 /wp-admin/admin.php?page=wb_sst#/tdk1,2286.22131.99151.99
网站地图 /wp-admin/admin.php?page=wb_sst#/sitemap1,2316.22126.58108.44
图片优化 /wp-admin/admin.php?page=wb_sst#/image1,2456.28121.3374.37
链接优化 /wp-admin/admin.php?page=wb_sst#/url1,2336.19136.55112.01
插件设置 /wp-admin/admin.php?page=wb_sst#/setting1,2286.18122.26113.39
其他杂项 /wp-admin/admin.php?page=wb_sst#/other1,2336.17115.47106.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_wb_sst_redirection_url
    • wp_wb_sst_broken_url
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • wb_sst_db_ver

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: url rewrite, description, title, keyword, alt...

smart-seo-tool/index.php 77% from 13 tests

This is the main PHP file of "Smart SEO Tool - SEO优化插件" version 4.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smart-seo-tool.php" instead of "index.php")
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "7.0.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 227 characters long)

Code Analysis 97% from 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
No dangerous file extensions were detected5,361 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP121,0243965,112
XSLT1240174
SQL13136
JavaScript3305635
CSS2033
SVG1001

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 158)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity118.33
▷ Minimum class complexity1.00
▷ Maximum class complexity351.00
Average method complexity7.07
▷ Minimum method complexity1.00
▷ Maximum method complexity158.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods160
▷ Static methods14490.00%
▷ Public methods15798.12%
▷ Protected methods00.00%
▷ Private methods31.88%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 compressed PNG file occupies 0.03MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tpl/assets/img/bsl.abf3bf80.png28.97KB28.95KB0.06%