10% jin10

Code Review | 金十数据

WordPress plugin 金十数据 scored10%from 54 tests.

About plugin

  • Plugin page: jin10
  • Plugin version: 0.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2015
  • Latest release: Sep 18, 2016
  • Number of updates: 33
  • Update frequency: every 9.1 days
  • Top authors: JohnShen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /765 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/jin10/jin10Widget.php+33
    Methods with the same name as their class will not be constructors in a future version of PHP; jin10Widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼53.73ms] Passed 4 tests

Analyzing server-side resources used by 金十数据
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.84 ▼35.81
Dashboard /wp-admin2.29 ▼1.0112.99 ▼39.56
Posts /wp-admin/edit.php2.29 ▼1.0611.91 ▼44.05
Add New Post /wp-admin/post-new.php2.29 ▼3.5911.17 ▼95.49
Media Library /wp-admin/upload.php2.29 ▼0.9411.33 ▼30.22

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_jin10-widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for 金十数据
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.31 ▼0.071.93 ▲0.0142.70 ▼5.65
Dashboard /wp-admin2,195 ▲185.61 ▼0.0288.32 ▼4.2137.07 ▼7.71
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0542.06 ▲1.5633.80 ▼9.01
Add New Post /wp-admin/post-new.php1,526 ▼517.54 ▼5.54665.38 ▼13.2652.97 ▲3.05
Media Library /wp-admin/upload.php1,397 ▼34.18 ▲0.08115.54 ▲1.4449.52 ▲0.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in jin10Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_jin10-widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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_action() in wp-content/plugins/jin10/jin10Widget.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: finance

jin10/jin10Widget.php 92% from 13 tests

Analyzing the main PHP file in "金十数据" version 0.0.7
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("jin10.php" instead of "jin10Widget.php")

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
Success! There were no dangerous files found in this plugin854 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript215045427
PHP16034341
CSS114086

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin