79% woo-product-add-tab

Code Review | Woo Product Add Tab

WordPress plugin Woo Product Add Tab scored79%from 54 tests.

About plugin

  • Plugin page: woo-product-add-tab
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Nov 2, 2015
  • Number of updates: 3
  • Update frequency: every 8.4 days
  • Top authors: shvv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /704 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.15MB] [CPU: ▼38.10ms] Passed 4 tests

Server-side resources used by Woo Product Add Tab
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6516.25 ▼25.37
Dashboard /wp-admin2.86 ▼0.4519.38 ▼34.66
Posts /wp-admin/edit.php2.86 ▼0.5018.06 ▼27.20
Add New Post /wp-admin/post-new.php2.86 ▼3.0318.56 ▼65.15
Media Library /wp-admin/upload.php2.86 ▼0.3717.49 ▼13.20

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Woo Product Add Tab
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.331.67 ▼0.0541.09 ▼5.18
Dashboard /wp-admin2,200 ▲95.76 ▼0.32100.41 ▼0.8741.65 ▲0.36
Posts /wp-admin/edit.php2,089 ▼01.98 ▲0.0134.53 ▼3.9335.06 ▼1.17
Add New Post /wp-admin/post-new.php1,542 ▲618.24 ▼5.11603.34 ▼61.2762.90 ▲9.75
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0195.13 ▼1.3841.58 ▼3.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-post-type.php+613
    Invalid argument supplied for foreach()
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === woo-product-add-tab === )
You can take inspiration from this readme.txt

woo-product-add-tab/woocommerce-add-tab.php 85% from 13 tests

The principal PHP file in "Woo Product Add Tab" v. 0.8 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-product-add-tab.php" instead of "woocommerce-add-tab.php")

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
Good job! No executable or dangerous file extensions detected286 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP15199200
PO File1131662
JavaScript114814
CSS1005
LESS1205

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.29
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1894.74%
▷ Protected methods15.26%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected