83% dropahint-integration

Code Review | Drop A Hint For WooCommerce

WordPress plugin Drop A Hint For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: dropahint-integra...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.9.2
  • WordPress version: 6.3.1
  • First release: Sep 27, 2017
  • Latest release: Mar 27, 2022
  • Number of updates: 16
  • Update frequency: every 102.6 days
  • Top authors: appsoluteapp (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /1,149 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.50ms] Passed 4 tests

This is a short check of server-side resources used by Drop A Hint For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0623.97 ▼19.12
Dashboard /wp-admin3.33 ▲0.0346.18 ▼0.45
Posts /wp-admin/edit.php3.39 ▲0.0244.46 ▲0.39
Add New Post /wp-admin/post-new.php5.92 ▲0.0283.06 ▼14.15
Media Library /wp-admin/upload.php3.26 ▲0.0235.86 ▼0.29

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Drop A Hint For WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,476 ▼29513.20 ▼1.480.56 ▼1.6019.09 ▼22.96
Dashboard /wp-admin2,217 ▲265.85 ▲0.00104.96 ▼1.5763.57 ▲18.79
Posts /wp-admin/edit.php2,103 ▲111.99 ▲0.0138.13 ▲3.7632.12 ▼0.48
Add New Post /wp-admin/post-new.php1,677 ▲14021.93 ▲3.91748.25 ▲88.3768.57 ▲12.12
Media Library /wp-admin/upload.php1,402 ▲144.23 ▲0.01106.32 ▲4.5950.95 ▲6.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

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
  • 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/dropahint-integration/dropahint.php:10

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #3 (Dashboard)
Please take inspiration from this readme.txt

dropahint-integration/dropahint.php 92% from 13 tests

"Drop A Hint For WooCommerce" version 2.0'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: Please rename the main PHP file in this plugin to the plugin slug ("dropahint-integration.php" instead of "dropahint.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin126 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1238126

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.84MB with 0.54MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png376.45KB153.38KB▼ 59.26%
assets/screenshot-1.png317.61KB128.67KB▼ 59.49%
images/dropahint2.png160.21KB61.46KB▼ 61.64%
images/dropahint.png3.41KB0.76KB▼ 77.82%