84% woo-one-product-per-category

Code Review | Woo One Product per Category

WordPress plugin Woo One Product per Category scored84%from 54 tests.

About plugin

  • Plugin page: woo-one-product-p...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Mar 21, 2019
  • Latest release: Mar 22, 2019
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: bash2day (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /551 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
Install script ran successfully

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

Analyzing server-side resources used by Woo One Product per Category
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.99 ▲0.15
Dashboard /wp-admin3.31 ▲0.0147.58 ▼3.34
Posts /wp-admin/edit.php3.36 ▲0.0150.27 ▲0.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.91 ▼7.12
Media Library /wp-admin/upload.php3.24 ▲0.0138.24 ▲1.14

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Woo One Product per Category: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.40 ▲0.021.73 ▲0.0139.17 ▼1.69
Dashboard /wp-admin2,198 ▲245.59 ▲0.0387.08 ▼20.1740.21 ▼9.99
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0336.57 ▼2.1031.38 ▼6.16
Add New Post /wp-admin/post-new.php1,545 ▲1423.11 ▼0.25677.89 ▼9.5360.03 ▲6.11
Media Library /wp-admin/upload.php1,400 ▲64.15 ▼0.17110.85 ▲1.1448.78 ▲3.97

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 were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at 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/woo-one-product-per-category/woo-one-product-per-category.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

woo-one-product-per-category/woo-one-product-per-category.php 92% from 13 tests

"Woo One Product per Category" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1222551

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
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
PNG images were not found in this plugin