84% therich-woo-frontend-add-product-form

Code Review | TheRich Woo Frontend Add Product Form

WordPress plugin TheRich Woo Frontend Add Product Form scored84%from 54 tests.

About plugin

  • Plugin page: therich-woo-front...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Jun 28, 2019
  • Latest release: Dec 10, 2020
  • Number of updates: 5
  • Update frequency: every 106.2 days
  • Top authors: therichpost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /738 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.22ms] Passed 4 tests

Server-side resources used by TheRich Woo Frontend Add Product Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.58 ▲2.25
Dashboard /wp-admin3.34 ▲0.0347.04 ▲2.93
Posts /wp-admin/edit.php3.39 ▲0.0345.18 ▼2.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.66 ▼32.05
Media Library /wp-admin/upload.php3.26 ▲0.0332.77 ▼0.60

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for TheRich Woo Frontend Add Product Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲16513.77 ▼0.5310.49 ▲8.7346.10 ▲5.98
Dashboard /wp-admin2,206 ▲155.80 ▲0.91115.84 ▲12.4044.90 ▼2.01
Posts /wp-admin/edit.php2,089 ▲212.06 ▲0.0235.65 ▼0.7434.24 ▲0.12
Add New Post /wp-admin/post-new.php1,533 ▲523.06 ▼0.07699.45 ▲88.6953.88 ▲4.51
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.0197.46 ▼5.9043.59 ▲0.46

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though no errors were found, 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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/therich-woo-frontend-add-product-form/therichwooproducts.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/therich-woo-frontend-add-product-form/functions.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

therich-woo-frontend-add-product-form/therichwooproducts.php 92% from 13 tests

"TheRich Woo Frontend Add Product Form" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("therich-woo-frontend-add-product-form.php" instead of "therichwooproducts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin281 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23128279
CSS1061
JavaScript1061

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected