84% jinshuju

Code Review | 金数据

WordPress plugin 金数据 scored84%from 54 tests.

About plugin

  • Plugin page: jinshuju
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.4
  • WordPress version: 6.3.1
  • First release: Jun 5, 2013
  • Latest release: Jun 5, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: iamroody (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,294 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.01ms] Passed 4 tests

Analyzing server-side resources used by 金数据
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.09 ▼2.79
Dashboard /wp-admin3.31 ▲0.0141.91 ▼6.70
Posts /wp-admin/edit.php3.36 ▲0.0046.84 ▼1.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.15 ▼0.51
Media Library /wp-admin/upload.php3.23 ▲0.0033.49 ▼1.33

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for 金数据
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.15 ▼1.441.61 ▼0.2137.06 ▼10.07
Dashboard /wp-admin2,206 ▲155.76 ▲0.8499.87 ▼3.4339.84 ▲1.04
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0340.03 ▲4.9636.25 ▲2.40
Add New Post /wp-admin/post-new.php1,533 ▼023.60 ▲0.35626.80 ▼68.3857.60 ▲6.57
Media Library /wp-admin/upload.php1,382 ▼94.23 ▲0.0794.28 ▼1.2842.15 ▼3.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/jinshuju/jinshuju.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (插件使用介绍), #2 (如何获得代码)
The official readme.txt is a good inspiration

jinshuju/jinshuju.php 92% from 13 tests

The principal PHP file in "金数据" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 445 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171413

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png58.16KB16.75KB▼ 71.20%
screenshot-2.png101.71KB29.35KB▼ 71.14%