67% jiangqie-free-mini-program

Code Review | JiangQie Free Mini Program

WordPress plugin JiangQie Free Mini Program scored67%from 54 tests.

About plugin

  • Plugin page: jiangqie-free-min...
  • Plugin version: 2.4.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Jul 1, 2021
  • Latest release: Oct 23, 2023
  • Number of updates: 37
  • Update frequency: every 22.8 days
  • Top authors: jiangqie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /7,573 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.64MB] [CPU: ▲7.73ms] 75% from 4 tests

Server-side resources used by JiangQie Free Mini Program
Please fix the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 707.48ms on /wp-admin/admin.php?page=jiangqie-api)
PageMemory (MB)CPU Time (ms)
Home /5.03 ▲1.5643.83 ▲4.88
Dashboard /wp-admin5.01 ▲1.66675.01 ▲619.83
Posts /wp-admin/edit.php5.04 ▲1.6852.73 ▲5.11
Add New Post /wp-admin/post-new.php7.65 ▲1.7590.25 ▲5.60
Media Library /wp-admin/upload.php4.91 ▲1.6848.67 ▲15.32
酱茄Free小程序 /wp-admin/admin.php?page=jiangqie-api4.99707.48
Codestar Framework /wp-admin/tools.php?page=csf-welcome4.9749.45
安装文档 /wp-admin/admin.php?page=jiangqie_xcx_free_setup4.6936.33
新版下载 /wp-admin/admin.php?page=jiangqie_xcx_free_upgrade4.6937.11

Server storage [IO: ▲1.96MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 159 new files
Database: 4 new tables, 7 new options
New tables
wp_jiangqie_post_like
wp_jiangqie_post_favorite
wp_jiangqie_post_search
wp_jiangqie_post_view
New WordPress options
db_upgraded
jiangqie-api
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for JiangQie Free Mini Program
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,071 ▲33613.49 ▼0.877.92 ▲6.2328.77 ▼19.09
Dashboard /wp-admin2,364 ▲1875.59 ▼0.1682.26 ▼6.92100.83 ▲58.95
Posts /wp-admin/edit.php2,149 ▲492.03 ▲0.0334.57 ▼0.1042.70 ▲4.07
Add New Post /wp-admin/post-new.php1,562 ▲3122.81 ▼0.40653.37 ▲27.2454.87 ▲1.21
Media Library /wp-admin/upload.php1,452 ▲554.13 ▼0.07108.05 ▲9.4455.84 ▲11.51
酱茄Free小程序 /wp-admin/admin.php?page=jiangqie-api2,7845.1565.00143.08
Codestar Framework /wp-admin/tools.php?page=csf-welcome1,6374.9554.0759.27
安装文档 /wp-admin/admin.php?page=jiangqie_xcx_free_setup1,1083.1752.6398.08
新版下载 /wp-admin/admin.php?page=jiangqie_xcx_free_upgrade1,6203.4270.28135.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_jiangqie_post_view
    • wp_jiangqie_post_like
    • wp_jiangqie_post_search
    • wp_jiangqie_post_favorite
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • jiangqie-api
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/jiangqie-free-mini-program/admin/partials/jiangqie-api-admin-display.php
    • > /wp-content/plugins/jiangqie-free-mini-program/includes/class-jiangqie-api-ajax.php
    • > /wp-content/plugins/jiangqie-free-mini-program/public/partials/jiangqie-api-public-display.php
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'JiangQie_API_Base_Controller' not found in wp-content/plugins/jiangqie-free-mini-program/public/rest/class-jiangqie-api-category-controller.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/jiangqie-free-mini-program/public/rest/class-jiangqie-api-base-controller.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/jiangqie-free-mini-program/admin/partials/profile.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/jiangqie-free-mini-program/admin/partials/hot.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/jiangqie-free-mini-program/admin/partials/category.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JiangQie_API_Base_Controller' not found in wp-content/plugins/jiangqie-free-mini-program/public/rest/class-jiangqie-api-other-controller.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JiangQie_API_Base_Controller' not found in wp-content/plugins/jiangqie-free-mini-program/public/rest/class-jiangqie-api-comment-controller.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/jiangqie-free-mini-program/admin/partials/home.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JiangQie_API_Base_Controller' not found in wp-content/plugins/jiangqie-free-mini-program/public/rest/class-jiangqie-api-post-controller.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/jiangqie-free-mini-program/admin/partials/user.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Tags: The plugin tags were not defined
You can take inspiration from this readme.txt

jiangqie-free-mini-program/jiangqie-api.php 85% from 13 tests

This is the main PHP file of "JiangQie Free Mini Program" version 2.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("jiangqie-free-mini-program.php" instead of "jiangqie-api.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected10,979 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
PHP1022,4101,4239,343
CSS108129627
Markdown2850379
PO File1160180324
JavaScript88084304
SVG2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity20.90
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity5.64
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes67
▷ Abstract classes22.99%
▷ Concrete classes6597.01%
▷ Final classes00.00%
Methods288
▷ Static methods3913.54%
▷ Public methods27294.44%
▷ Protected methods00.00%
▷ Private methods165.56%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.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
10 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/id_bg.png11.01KB11.14KB0.00%
public/images/timeline_bg.png0.10KB0.10KB0.00%
public/images/cat_cover.png2.66KB2.82KB0.00%
admin/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
admin/js/layer/theme/default/icon.png11.22KB4.36KB▼ 61.19%