90% woo-private-product

Code Review | Woo Private Product

WordPress plugin Woo Private Product scored90%from 54 tests.

About plugin

  • Plugin page: woo-private-product
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 13, 2019
  • Latest release: Jan 18, 2019
  • Number of updates: 19
  • Update frequency: every 0.3 days
  • Top authors: willnv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,604 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.16MB] [CPU: ▼13.22ms] Passed 4 tests

An overview of server-side resources used by Woo Private Product
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.80 ▼0.6716.19 ▼29.26
Dashboard /wp-admin3.33 ▼0.0149.72 ▼12.46
Posts /wp-admin/edit.php3.38 ▲0.0347.85 ▼1.50
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.92 ▼9.66
Media Library /wp-admin/upload.php3.25 ▲0.0239.41 ▲3.50

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Private Product
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.161.85 ▲0.0445.18 ▲2.97
Dashboard /wp-admin2,209 ▲215.90 ▲0.81102.49 ▼12.4242.70 ▲2.47
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.1736.84 ▼5.1031.90 ▼6.08
Add New Post /wp-admin/post-new.php1,514 ▼2317.55 ▼0.67686.18 ▲46.8657.31 ▲5.23
Media Library /wp-admin/upload.php1,388 ▼34.25 ▼0.12112.92 ▲9.8547.64 ▲2.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

woo-private-product/woo-private-product.php Passed 13 tests

"Woo Private Product" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
60 characters long description:
Restrict products on your Woocommerce store to unique users.

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 detected180 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2325884
PO File2101052
JavaScript27823
CSS16021

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods112.50%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin