84% auto-approve-product-reviews

Code Review | Auto Approve Product reviews

WordPress plugin Auto Approve Product reviews scored84%from 54 tests.

About plugin

  • Plugin page: auto-approve-prod...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 17, 2020
  • Latest release: May 17, 2020
  • Number of updates: 2
  • Update frequency: every 4.5 days
  • Top authors: andrei.igna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /601 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Auto Approve Product reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.59 ▲2.32
Dashboard /wp-admin3.31 ▲0.0151.05 ▼2.57
Posts /wp-admin/edit.php3.36 ▲0.0147.51 ▼3.31
Add New Post /wp-admin/post-new.php5.89 ▲0.01106.36 ▼4.74
Media Library /wp-admin/upload.php3.24 ▲0.0140.79 ▲1.89

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
woocommerce_reviews_auto_approve_rating
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Auto Approve Product reviews: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.381.79 ▲0.1340.57 ▲0.02
Dashboard /wp-admin2,195 ▲155.57 ▼0.0793.81 ▲2.4739.87 ▼2.28
Posts /wp-admin/edit.php2,100 ▲32.05 ▲0.0334.83 ▼6.4633.83 ▼5.65
Add New Post /wp-admin/post-new.php1,549 ▲923.09 ▼0.23655.81 ▲52.5356.05 ▲2.25
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.01107.46 ▲4.0144.98 ▲0.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • woocommerce_reviews_auto_approve_rating
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-approve-product-reviews/auto-approve-product-reviews.php:96

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 88% 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:
  • Screenshots: Screenshot #2 (WooCommerce product reviews) image missing
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

auto-approve-product-reviews/auto-approve-product-reviews.php Passed 13 tests

The primary PHP file in "Auto Approve Product reviews" version 1.0.0 is used by WordPress to initiate all plugin functionality
64 characters long description:
Auto approve product reviews with a minimum rating chosen by you

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1241756

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods233.33%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ 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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin