83% keydatas

Code Review | 简数采集器

WordPress plugin 简数采集器 scored83%from 54 tests.

About plugin

  • Plugin page: keydatas
  • Plugin version: 2.5.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2018
  • Latest release: Sep 21, 2023
  • Number of updates: 95
  • Update frequency: every 21.3 days
  • Top authors: zhengdon (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active /74,646 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼12.72ms] Passed 4 tests

Analyzing server-side resources used by 简数采集器
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.94 ▼6.13
Dashboard /wp-admin3.35 ▲0.0147.34 ▼17.49
Posts /wp-admin/edit.php3.40 ▲0.0545.70 ▼2.06
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.78 ▼25.20
Media Library /wp-admin/upload.php3.28 ▲0.0539.67 ▼0.12

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for 简数采集器
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1814.65 ▲0.281.83 ▼0.1042.74 ▼1.17
Dashboard /wp-admin2,207 ▲275.54 ▼0.0686.36 ▼3.8282.58 ▲37.37
Posts /wp-admin/edit.php2,115 ▲122.02 ▼0.0139.89 ▲2.1939.59 ▲7.37
Add New Post /wp-admin/post-new.php1,557 ▲3123.35 ▼0.32669.22 ▼16.2056.98 ▼0.43
Media Library /wp-admin/upload.php1,418 ▲154.19 ▼0.02104.17 ▲0.2377.21 ▲32.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/keydatas/publish-setting.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/keydatas/keydatas.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues 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: A description for screenshot #2 is required in keydatas/assets to your readme.txt
  • Tags: No tags were detected
You can take inspiration from this readme.txt

keydatas/keydatas.php 92% from 13 tests

This is the main PHP file of "简数采集器" version 2.5.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 269 characters long)

Code Analysis Passed 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
There were no executable files found in this plugin452 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23260452

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.64
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%
Functions10
▷ Named functions10100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png3.22KB0.57KB▼ 82.33%