84% wptimhbw-tools

Code Review | WPTimhbw Tools

WordPress plugin WPTimhbw Tools scored84%from 54 tests.

About plugin

  • Plugin page: wptimhbw-tools
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: Feb 29, 2020
  • Number of updates: 17
  • Update frequency: every 1.4 days
  • Top authors: timhbwtools (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /799 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WPTimhbw Tools
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.89 ▼0.95
Dashboard /wp-admin3.32 ▲0.0247.36 ▼3.00
Posts /wp-admin/edit.php3.37 ▲0.0248.65 ▲1.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.65 ▲1.15
Media Library /wp-admin/upload.php3.25 ▲0.0236.82 ▼0.42
设置 /wp-admin/admin.php?page=wptimhbw-setting3.2133.24
工具介绍 /wp-admin/admin.php?page=wptimhbw-about3.2133.58

Server storage [IO: ▲0.43MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
wtht_exts
wptimhbw_tools
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WPTimhbw Tools
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.68 ▼0.751.93 ▲0.0637.88 ▼5.47
Dashboard /wp-admin2,229 ▲415.02 ▲0.09109.03 ▲7.4646.80 ▲3.97
Posts /wp-admin/edit.php2,109 ▲202.05 ▲0.0538.71 ▼0.4444.32 ▲5.22
Add New Post /wp-admin/post-new.php1,554 ▲1223.18 ▲4.82632.38 ▼16.0156.34 ▲2.94
Media Library /wp-admin/upload.php1,411 ▲294.22 ▲0.0396.78 ▼4.8745.46 ▲1.04
设置 /wp-admin/admin.php?page=wptimhbw-setting1,0781.9529.11102.06
工具介绍 /wp-admin/admin.php?page=wptimhbw-about7852.0225.5146.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wptimhbw-tools/includes/imgcenter.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wptimhbw-tools/includes/pagehtml.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wptimhbw-tools/wptimhbw-tools.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wptimhbw-tools/includes/qiniucdn.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wptimhbw-tools/includes/setgravatar.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wptimhbw-tools/includes/disable_functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wptimhbw-tools/includes/tongji.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: gravatar, cdn, qiniu

wptimhbw-tools/wptimhbw-tools.php Passed 13 tests

This is the main PHP file of "WPTimhbw Tools" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
42 characters long description:
设置博客静态资源使用七牛云CDN

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 plugin448 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP106620345
CSS105102
JavaScript1011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.41MB with 0.29MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png186.22KB49.46KB▼ 73.44%
assets/screenshot-2.png233.62KB71.91KB▼ 69.22%