10% woo-already-bought

Code Review | Woo Already Bought

WordPress plugin Woo Already Bought scored10%from 54 tests.

About plugin

  • Plugin page: woo-already-bought
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 25, 2017
  • Latest release: Jan 25, 2017
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: mattQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,029 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
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Woo_Already_Bought::activation() should not be called statically

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

Server-side resources used by Woo Already Bought
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.39 ▲4.14
Dashboard /wp-admin3.31 ▲0.0043.98 ▼1.09
Posts /wp-admin/edit.php3.36 ▲0.0045.12 ▼2.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.10 ▼6.52
Media Library /wp-admin/upload.php3.23 ▲0.0035.94 ▲2.83

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Woo Already Bought: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.162.05 ▲0.3143.34 ▲0.12
Dashboard /wp-admin2,203 ▲155.80 ▼0.09102.17 ▼3.9339.78 ▼4.53
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0736.42 ▼4.3134.90 ▼1.64
Add New Post /wp-admin/post-new.php1,542 ▲918.57 ▼4.57618.86 ▲11.3049.67 ▲1.30
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0298.16 ▼4.8240.90 ▼2.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Woo_Already_Bought::uninstall() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/woo-already-bought/woo-already-bought.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can take inspiration from this readme.txt

woo-already-bought/woo-already-bought.php Passed 13 tests

"Woo Already Bought" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
86 characters long description:
Inform your clients if they bought any product already or if product is added to cart.

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
Success! There were no dangerous files found in this plugin1 line of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected