84% apoyl-grabweixin

Code Review | [凹凸曼]一键采集微信文章

WordPress plugin [凹凸曼]一键采集微信文章 scored84%from 54 tests.

About plugin

  • Plugin page: apoyl-grabweixin
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Sep 14, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 10
  • Update frequency: every 43.5 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,453 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.68ms] 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.0545.06 ▲3.46
Dashboard /wp-admin3.35 ▲0.0148.84 ▼12.80
Posts /wp-admin/edit.php3.47 ▲0.1148.36 ▲2.87
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.46 ▼11.05
Media Library /wp-admin/upload.php3.28 ▲0.0535.45 ▲2.26
settings /wp-admin/options-general.php?page=apoyl-grabweixin-settings3.2540.98

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
apoyl-grabweixin-settings
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for [凹凸曼]一键采集微信文章
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.67 ▲0.461.62 ▲0.0237.33 ▼5.97
Dashboard /wp-admin2,199 ▲185.58 ▼0.0989.99 ▼24.4842.06 ▼1.53
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0739.32 ▼0.3536.72 ▲1.97
Add New Post /wp-admin/post-new.php6,237 ▲4,70726.08 ▲3.01832.36 ▲205.2557.21 ▲7.55
Media Library /wp-admin/upload.php1,404 ▲104.17 ▼0.0395.70 ▼2.6240.83 ▼0.63
settings /wp-admin/options-general.php?page=apoyl-grabweixin-settings8411.9930.0234.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just 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/apoyl-grabweixin/admin/partials/setting.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/apoyl-grabweixin/admin/partials/editorsetting.php:10

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: weixin

apoyl-grabweixin/apoyl-grabweixin.php 92% from 13 tests

"[凹凸曼]一键采集微信文章" version 1.6.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin358 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1288134355
JavaScript1203

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.43
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods310.71%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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