78% weixin-cloned

Code Review | 微信分身

WordPress plugin 微信分身 scored78%from 54 tests.

About plugin

  • Plugin page: weixin-cloned
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2018
  • Latest release: Apr 3, 2018
  • Number of updates: 5
  • Update frequency: every 2.8 days
  • Top authors: smyx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,756 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.52ms] Passed 4 tests

An overview of server-side resources used by 微信分身
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.93 ▼7.62
Dashboard /wp-admin3.32 ▲0.0245.57 ▼10.22
Posts /wp-admin/edit.php3.37 ▲0.0252.95 ▲2.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.76 ▼4.49
Media Library /wp-admin/upload.php3.25 ▲0.0234.05 ▼3.76
微信分身 /wp-admin/options-general.php?page=weixin-cloned3.1929.50

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

微信分身: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▼0.322.00 ▲0.1941.29 ▼2.62
Dashboard /wp-admin2,213 ▲254.86 ▼1.04109.39 ▲4.0646.62 ▲1.48
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.0341.75 ▲5.4539.87 ▲4.35
Add New Post /wp-admin/post-new.php1,546 ▲2718.09 ▼5.16605.32 ▼58.8458.62 ▲10.13
Media Library /wp-admin/upload.php1,389 ▲44.19 ▼0.0297.87 ▼11.4250.59 ▲4.29
微信分身 /wp-admin/options-general.php?page=weixin-cloned8512.0224.80118.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=weixin-cloned
    • > Notice in wp-content/plugins/weixin-cloned/weixin-cloned.php+48
    Trying to access array offset on value of type bool

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/weixin-cloned/weixin-cloned.php:11

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === weixin-cloned === )
You can take inspiration from this readme.txt

weixin-cloned/weixin-cloned.php 92% from 13 tests

The entry point to "微信分身" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 380 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin81 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11981

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions3
▷ Named functions3100.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
There are no PNG files in this plugin