78% leshou

Code Review | 乐收

WordPress plugin 乐收 scored78%from 54 tests.

About plugin

  • Plugin page: leshou
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.3
  • WordPress version: 6.3.1
  • First release: Oct 6, 2013
  • Latest release: Oct 11, 2013
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: yekong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /685 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: ▼4.27MB] [CPU: ▼851,851.26ms] Passed 4 tests

A check of server-side resources used by 乐收
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0345.72 ▲0.96
Dashboard /wp-admin3.38 ▼17.1952.88 ▼3,407,395.35
Posts /wp-admin/edit.php3.50 ▲0.1050.12 ▲1.03
Add New Post /wp-admin/post-new.php5.97 ▲0.0390.40 ▼8.89
Media Library /wp-admin/upload.php3.31 ▲0.0338.22 ▼1.74
乐收 /wp-admin/options-general.php?page=wpleshou3.2733.02

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for 乐收
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.17 ▼0.181.79 ▼0.0442.66 ▲0.42
Dashboard /wp-admin2,199 ▲185.63 ▼0.0596.51 ▼1.4447.58 ▲8.15
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0633.67 ▼1.7237.95 ▲3.54
Add New Post /wp-admin/post-new.php1,531 ▼423.19 ▲5.07595.34 ▼46.9557.60 ▼1.84
Media Library /wp-admin/upload.php1,404 ▲14.33 ▲0.0596.59 ▼6.9545.48 ▼0.72
乐收 /wp-admin/options-general.php?page=wpleshou8202.0025.7856.53

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpleshou
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpleshou
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/leshou/leshou.php:105

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

leshou/leshou.php Passed 13 tests

The main PHP script in "乐收" version 1.0.1 is automatically included on every request by WordPress
64 characters long description:
同步发表到乐收,初次安装必须设置后才能使用。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin294 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22622294

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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