71% business-reviews

Code Review | Business Reviews

WordPress plugin Business Reviews scored 71% from 54 tests.

About plugin

  • Plugin page: business-reviews
  • Plugin version: 2.5.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Apr 9, 2017
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: quicklyreviewus (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,052 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.51ms] Passed 4 tests

A check of server-side resources used by Business Reviews
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.45 ▼5.14
Dashboard /wp-admin3.34 ▲0.0445.41 ▼0.77
Posts /wp-admin/edit.php3.39 ▲0.0449.46 ▲6.36
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.16 ▼6.57
Media Library /wp-admin/upload.php3.26 ▲0.0432.98 ▼1.54
Review Scan /wp-admin/admin.php?page=qru-business-scan3.2330.83
Review Reporting /wp-admin/admin.php?page=qru-review-reporting3.2331.48
Review Stream /wp-admin/admin.php?page=qru-business3.2530.16
Review Page /wp-admin/admin.php?page=qru-review-page3.2532.04

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Business Reviews
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.22 ▼1.071.70 ▼0.0840.45 ▼5.58
Dashboard /wp-admin2,241 ▲565.81 ▲0.8995.62 ▼6.3637.71 ▼3.94
Posts /wp-admin/edit.php2,124 ▲352.02 ▲0.0136.94 ▲3.4733.98 ▲2.06
Add New Post /wp-admin/post-new.php1,561 ▲1723.26 ▲0.33664.77 ▼4.4154.20 ▼0.41
Media Library /wp-admin/upload.php1,423 ▲384.23 ▲0.0396.04 ▼3.4441.85 ▼6.21
Review Scan /wp-admin/admin.php?page=qru-business-scan8052.1435.5626.98
Review Reporting /wp-admin/admin.php?page=qru-review-reporting8111.8624.6845.20
Review Stream /wp-admin/admin.php?page=qru-business9742.0323.1054.08
Review Page /wp-admin/admin.php?page=qru-review-page1,4725.9556.7354.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/business-reviews/includes/qru-review-scan.php
    • > /wp-content/plugins/business-reviews/includes/qru-review-reporting.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/business-reviews/includes/qru-review-page.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/business-reviews/includes/qru-review-page.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/business-reviews/includes/qru-review-stream.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=qru-review-reporting
    • > Network (severe)
    chrome-error://chromewebdata/ - Failed to load resource: the server responded with a status of 520 ()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=qru-review-reporting
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://www.quicklyreview.us/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
    • > GET request to /wp-admin/admin.php?page=qru-review-page
    • > Network (severe)
    wp-content/plugins/qru-business-reviews/assets/integrated-partners.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=qru-review-page
    • > Network (severe)
    wp-content/plugins/qru-business-reviews/assets/intive-campaigns.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=qru-review-page
    • > Network (severe)
    wp-content/plugins/qru-business-reviews/assets/review-stream.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=qru-review-page
    • > Network (severe)
    wp-content/plugins/qru-business-reviews/assets/review-monitoring.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=qru-review-page
    • > Network (severe)
    wp-content/plugins/qru-business-reviews/assets/generate-detailed-pdf-reports.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #2, #3, #4, #5, #6, #7 in business-reviews/assets to your readme.txt
The official readme.txt is a good inspiration

business-reviews/qru-business-reviews.php 77% from 13 tests

The entry point to "Business Reviews" version 2.5.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("business-reviews.php" instead of "qru-business-reviews.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 230 characters long)

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
No dangerous file extensions were detected91 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2223365
PHP8125218
CSS3278

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.62MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/review-stream.png157.20KB61.30KB▼ 61.00%
assets/generate-detailed-pdf-reports.png98.89KB42.30KB▼ 57.23%
assets/review-monitoring.png107.68KB50.12KB▼ 53.45%
assets/intive-campaigns.png64.97KB24.47KB▼ 62.35%
assets/integrated-partners.png203.06KB60.72KB▼ 70.10%