79% key-spider

Code Review | 蜘蛛-关键字

WordPress plugin 蜘蛛-关键字 scored 79% from 54 tests.

About plugin

  • Plugin page: key-spider
  • Plugin version: 0.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.7.2
  • WordPress version: 5.8.1
  • First release: Jun 5, 2020
  • Latest release: Jul 13, 2021
  • Number of updates: 10
  • Update frequency: every 40.4 days
  • Top authors: kelerkgibo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,423 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼142.19ms] Passed 4 tests

This is a short check of server-side resources used by 蜘蛛-关键字
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.1637.26 ▼0.38
Dashboard /wp-admin3.22 ▲0.1750.49 ▲2.73
Posts /wp-admin/edit.php3.28 ▲0.1746.60 ▲0.19
Add New Post /wp-admin/post-new.php5.58 ▲0.1593.20 ▼569.64
Media Library /wp-admin/upload.php3.17 ▲0.1732.28 ▲1.07

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 122 new files
Database: 3 new tables, 1 new option
New tables
wp_baiduseo_zhizhu
wp_baiduseo_keywords
wp_baiduseo_zhizhu_suoyin
New WordPress options
keyspider_tongji

Browser metrics Passed 4 tests

Checking browser requirements for 蜘蛛-关键字
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12716.36 ▲0.629.13 ▲0.5644.85 ▼4.10
Dashboard /wp-admin2,987 ▲565.91 ▼0.08158.46 ▲3.04109.88 ▲1.80
Posts /wp-admin/edit.php2,759 ▲202.72 ▲0.0267.32 ▼11.7682.54 ▼3.46
Add New Post /wp-admin/post-new.php1,628 ▲3421.09 ▲2.34305.27 ▼90.12101.11 ▼8.09
Media Library /wp-admin/upload.php1,830 ▲235.03 ▲0.01151.61 ▼5.74122.90 ▲2.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_baiduseo_zhizhu
    • wp_baiduseo_zhizhu_suoyin
    • wp_baiduseo_keywords
  • Zombie WordPress options detected upon uninstall: 1 option
    • keyspider_tongji

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: The plugin tags were not defined
You can take inspiration from this readme.txt

key-spider/key_spider.php 92% from 13 tests

The main file in "蜘蛛-关键字" v. 0.0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("key-spider.php" instead of "key_spider.php")

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 plugin2,657 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP8268422,423
SVG13563195
JavaScript230034
CSS5055

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.38
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity5.75
▷ Minimum method complexity2.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
layui/css/modules/layer/default/icon-ext.png9.74KB3.05KB▼ 68.67%
image/jianhao.png1.67KB0.29KB▼ 82.33%
layui/css/modules/layer/default/icon.png12.83KB4.39KB▼ 65.77%
image/jiahao.png2.48KB0.41KB▼ 83.44%