78% wp-customer-reviews

Code Review | WP Customer Reviews

WordPress plugin WP Customer Reviews scored78%from 54 tests.

About plugin

  • Plugin page: wp-customer-reviews
  • Plugin version: 3.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 13, 2011
  • Latest release: Nov 3, 2023
  • Number of updates: 188
  • Update frequency: every 24.7 days
  • Top authors: bompus (100%)

Code review

54 tests

User reviews

514 reviews

Install metrics

30,000+ active /1,125,403 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
Installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼5.53ms] Passed 4 tests

Analyzing server-side resources used by WP Customer Reviews
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2438.54 ▼0.60
Dashboard /wp-admin3.84 ▲0.5050.11 ▼10.64
Posts /wp-admin/edit.php3.89 ▲0.5451.85 ▼0.20
Add New Post /wp-admin/post-new.php6.37 ▲0.4986.12 ▼10.67
Media Library /wp-admin/upload.php3.74 ▲0.5138.04 ▲7.61
All Reviews /wp-admin/edit.php?post_type=wpcr3_review3.7537.62
Plugin Settings /wp-admin/admin.php?page=wpcr3_options3.7431.60

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
wpcr3_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Customer Reviews
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲18213.40 ▼1.399.11 ▲7.4738.23 ▼6.00
Dashboard /wp-admin2,207 ▲365.56 ▼0.0894.96 ▲4.6086.63 ▲43.41
Posts /wp-admin/edit.php2,133 ▲332.06 ▲0.1239.12 ▼0.9734.67 ▼0.36
Add New Post /wp-admin/post-new.php6,476 ▲4,95025.90 ▲2.75923.32 ▲316.5763.52 ▲10.72
Media Library /wp-admin/upload.php1,427 ▲244.24 ▲0.0498.20 ▲1.9577.36 ▲32.08
All Reviews /wp-admin/edit.php?post_type=wpcr3_review1,2082.3143.5727.27
Plugin Settings /wp-admin/admin.php?page=wpcr3_options9301.8429.6329.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • wpcr3_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-customer-reviews/include/admin/tools/remove-duplicates.php
    • > /wp-content/plugins/wp-customer-reviews/include/admin/tools/delete-all-reviews.php
    • > /wp-content/plugins/wp-customer-reviews/include/admin/tools/reimport-2x.php
    • > /wp-content/plugins/wp-customer-reviews/include/ajax.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-customer-reviews/wp-customer-reviews-3.php:109
    • > PHP Fatal error
      Uncaught Error: Class 'WPCustomerReviews3' not found in wp-content/plugins/wp-customer-reviews/include/admin/wp-customer-reviews-3-admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 28 tag instead of maximum 10
You can look at the official readme.txt

wp-customer-reviews/wp-customer-reviews-3.php 85% from 13 tests

The primary PHP file in "WP Customer Reviews" version 3.7.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 149 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-customer-reviews.php" instead of "wp-customer-reviews-3.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
There were no executable files found in this plugin3,463 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP94752222,512
CSS2337412
HTML1040283
JavaScript24510256

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity132.33
▷ Minimum class complexity62.00
▷ Maximum class complexity172.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods110
▷ Static methods65.45%
▷ Public methods10797.27%
▷ Protected methods00.00%
▷ Private methods32.73%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/1x1.png0.07KB0.09KB0.00%
css/star.png0.64KB0.78KB0.00%
css/newstars.png1.00KB0.78KB▼ 21.51%