90% woo-products-require-account

Code Review | Woo Products Require Account

WordPress plugin Woo Products Require Account scored90%from 54 tests.

About plugin

  • Plugin page: woo-products-requ...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2016
  • Latest release: Mar 21, 2016
  • Number of updates: 11
  • Update frequency: every 92.1 days
  • Top authors: macbookandrew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,668 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.86ms] Passed 4 tests

This is a short check of server-side resources used by Woo Products Require Account
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.15 ▼2.59
Dashboard /wp-admin3.33 ▼0.0251.86 ▼13.13
Posts /wp-admin/edit.php3.38 ▲0.0247.37 ▼6.38
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.41 ▼16.44
Media Library /wp-admin/upload.php3.25 ▲0.0235.13 ▼3.48

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Products Require Account
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.28 ▲0.011.78 ▲0.0443.46 ▲2.03
Dashboard /wp-admin2,195 ▲245.48 ▼0.0896.51 ▲7.5542.21 ▲0.60
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0136.03 ▼3.3136.21 ▲0.25
Add New Post /wp-admin/post-new.php1,526 ▼923.44 ▲5.09648.00 ▲36.1351.83 ▼16.58
Media Library /wp-admin/upload.php1,394 ▼34.18 ▲0.0296.72 ▼5.3844.83 ▲0.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: require account, account, user account, per-product account, membership

woo-products-require-account/woo-products-require-account.php 92% from 13 tests

The main PHP script in "Woo Products Require Account" version 1.0.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 characters long)

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
There were no executable files found in this plugin147 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1201987
JavaScript18147
JSON10013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected