89% rea-wc-products

Code Review | REA Products for WooCommerce

WordPress plugin REA Products for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: rea-wc-products
  • Plugin version: 1.0.8
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 30, 2022
  • Latest release: Nov 22, 2023
  • Number of updates: 11
  • Update frequency: every 46.8 days
  • Top authors: robertallin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.99ms] Passed 4 tests

A check of server-side resources used by REA Products for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.41 ▼6.67
Dashboard /wp-admin3.31 ▲0.0045.23 ▼5.15
Posts /wp-admin/edit.php3.36 ▲0.0047.24 ▲3.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.53 ▼5.38
Media Library /wp-admin/upload.php3.23 ▲0.0033.89 ▲1.25

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for REA Products for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.69 ▲0.331.70 ▼0.3439.41 ▼2.91
Dashboard /wp-admin2,192 ▲125.64 ▼0.0195.94 ▼5.6642.67 ▼0.36
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0640.91 ▲1.0235.50 ▲0.43
Add New Post /wp-admin/post-new.php1,526 ▼023.12 ▲0.04659.82 ▲53.2142.78 ▼3.63
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0095.76 ▼3.8141.67 ▲1.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt Passed 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
4 plugin tags: products list, external website products from woocommerce, woocommerce, external products

rea-wc-products/reawcproducts.php 85% from 13 tests

The main PHP script in "REA Products for WooCommerce" version 1.0.8 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rea-wc-products.php" instead of "reawcproducts.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected898 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2134200546
CSS2152188
Sass1190103
JavaScript16061

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants3100.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