10% h-seeed-wp

Code Review | H Speed WP

WordPress plugin H Speed WP scored10%from 54 tests.

About plugin

  • Plugin page: h-seeed-wp
  • Plugin version: 4.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 28, 2015
  • Latest release: Jul 5, 2016
  • Number of updates: 67
  • Update frequency: every 4.7 days
  • Top authors: yokudekiru (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,894 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/h-seeed-wp/H-Seeed-WP.php+36
    Undefined offset: 84

Server metrics [RAM: ▼1.89MB] [CPU: ▼56.05ms] Passed 4 tests

Server-side resources used by H Speed WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.416.02 ▼36.80
Dashboard /wp-admin2.13 ▼1.177.59 ▼45.83
Posts /wp-admin/edit.php2.14 ▼1.228.97 ▼43.21
Add New Post /wp-admin/post-new.php2.13 ▼3.757.04 ▼98.36
Media Library /wp-admin/upload.php2.13 ▼1.096.33 ▼32.64
H Speed WP 設定 /wp-admin/options-general.php?page=h-speed-wp2.147.08

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

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

Browser metrics Passed 4 tests

H Speed WP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.111.81 ▼0.0843.64 ▼0.11
Dashboard /wp-admin2,207 ▲195.82 ▲0.90101.04 ▼4.6643.76 ▼1.37
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0339.42 ▼0.1039.64 ▲5.50
Add New Post /wp-admin/post-new.php1,536 ▲823.21 ▼0.32630.34 ▼68.1950.29 ▼2.72
Media Library /wp-admin/upload.php1,389 ▲14.23 ▲0.01103.55 ▼7.3847.78 ▲2.04
H Speed WP 設定 /wp-admin/options-general.php?page=h-speed-wp1,7782.0945.44253.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/h-seeed-wp/H-Seeed-WP.php+36
    Undefined offset: 84
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=h-speed-wp
    • > Notice in wp-content/plugins/h-seeed-wp/admin/admin.php+266
    Undefined offset: 84
    • > GET request to /wp-admin/options-general.php?page=h-speed-wp
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
  • 26× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/h-seeed-wp/function/security.php on line 155
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/h-seeed-wp/function/security.php on line 221
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/h-seeed-wp/admin/admin_action.php on line 64
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/h-seeed-wp/admin/admin_action.php on line 5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/h-seeed-wp/admin/admin_action.php on line 63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/h-seeed-wp/function/variable.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/h-seeed-wp/function/server_capacitance.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/h-seeed-wp/function/security.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/h-seeed-wp/admin/admin_action.php on line 65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/h-seeed-wp/function/spam_comment.php:45

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=h-speed-wp
    • > Network (severe)
    https://www.bing.com/widget/metrics.js - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

h-seeed-wp/H-Seeed-WP.php 85% from 13 tests

"H Speed WP" version 4.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("h-seeed-wp.php" instead of "H-Seeed-WP.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,114 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP133093461,834
CSS1360257
JavaScript50823

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions85
▷ Named functions2832.94%
▷ Anonymous functions5767.06%
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
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png34.25KB21.29KB▼ 37.84%