84% i3geek-baiduxzh

Code Review | BaiduXZH Submit(百度熊掌号)

WordPress plugin BaiduXZH Submit(百度熊掌号) scored84%from 54 tests.

About plugin

  • Plugin page: i3geek-baiduxzh
  • Plugin version: 1.4.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.0.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2018
  • Latest release: Dec 30, 2018
  • Number of updates: 6
  • Update frequency: every 58.8 days
  • Top authors: i3geek (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /19,179 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼12.58ms] Passed 4 tests

This is a short check of server-side resources used by BaiduXZH Submit(百度熊掌号)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.84 ▼2.37
Dashboard /wp-admin3.13 ▼0.1829.26 ▼21.82
Posts /wp-admin/edit.php3.50 ▲0.1448.25 ▲1.05
Add New Post /wp-admin/post-new.php5.28 ▼0.6166.43 ▼26.70
Media Library /wp-admin/upload.php3.31 ▲0.0834.00 ▲0.57

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
I3GEEK_XZH_SETTING
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BaiduXZH Submit(百度熊掌号)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10913.29 ▼1.141.89 ▼0.0846.15 ▼3.62
Dashboard /wp-admin2,247 ▲555.81 ▲0.85100.69 ▼3.2842.79 ▼1.76
Posts /wp-admin/edit.php2,130 ▲412.02 ▼0.0335.88 ▼3.4638.23 ▲3.33
Add New Post /wp-admin/post-new.php1,535 ▲223.34 ▲0.18644.16 ▼39.0250.57 ▼6.72
Media Library /wp-admin/upload.php1,429 ▲414.26 ▲0.0595.87 ▼5.2445.33 ▲2.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • I3GEEK_XZH_SETTING
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× 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/i3geek-baiduxzh/i3geek_baiduXZH.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/i3geek-baiduxzh/i3geek_baiduXZH_html.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
4 plugin tags: baidu, linksubmit, sitemap, seo

i3geek-baiduxzh/i3geek_baiduXZH.php 85% from 13 tests

The main PHP script in "BaiduXZH Submit(百度熊掌号)" version 1.4.6 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("i3geek-baiduxzh.php" instead of "i3geek_baiduXZH.php")

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
No dangerous file extensions were detected861 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP359652
CSS1260205
JavaScript1004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods13100.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
logo.png164.19KB61.40KB▼ 62.60%