83% widget-for-opio-reviews

Code Review | Widget for OPIO Reviews

WordPress plugin Widget for OPIO Reviews scored83%from 54 tests.

About plugin

  • Plugin page: widget-for-opio-r...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 28, 2023
  • Latest release: Oct 28, 2023
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: dhiraj201site (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /11 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.41MB] [CPU: ▼12.51ms] Passed 4 tests

Analyzing server-side resources used by Widget for OPIO Reviews
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1842.30 ▲1.03
Dashboard /wp-admin3.64 ▲0.3450.35 ▼0.92
Posts /wp-admin/edit.php3.70 ▲0.3445.42 ▲1.49
Add New Post /wp-admin/post-new.php3.46 ▼2.4334.40 ▼51.65
Media Library /wp-admin/upload.php3.50 ▲0.2841.71 ▲6.74
Support /wp-admin/admin.php?page=grw-support3.4733.78
Builder /wp-admin/admin.php?page=grw-builder3.4933.41
Widgets /wp-admin/edit.php?post_type=grw_feed3.5638.27

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Widget for OPIO Reviews
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8313.79 ▼0.572.34 ▲0.4243.21 ▲0.26
Dashboard /wp-admin2,225 ▲455.05 ▼0.6092.79 ▼5.9981.86 ▲39.71
Posts /wp-admin/edit.php2,146 ▲462.54 ▲0.5334.76 ▼1.4634.39 ▼1.53
Add New Post /wp-admin/post-new.php1,721 ▲19522.56 ▼0.40750.05 ▲91.8128.62 ▼22.62
Media Library /wp-admin/upload.php1,507 ▲1074.70 ▲0.5194.79 ▼5.1483.54 ▲39.79
Support /wp-admin/admin.php?page=grw-support1,1082.1326.0846.08
Builder /wp-admin/admin.php?page=grw-builder1,2483.4139.4269.94
Widgets /wp-admin/edit.php?post_type=grw_feed1,2442.4032.5535.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=grw-builder
    • > Notice in wp-content/plugins/widget-for-opio-reviews/includes/class-builder-page.php+84
    Undefined variable: home_url
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=grw-builder
    • > Notice in wp-content/plugins/widget-for-opio-reviews/includes/class-builder-page.php+169
    Trying to get property 'review_enabled' of non-object
    • > GET request to /wp-admin/admin.php?page=grw-builder
    • > Notice in wp-content/plugins/widget-for-opio-reviews/includes/class-builder-page.php+276
    Undefined variable: biz_org_id

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

widget-for-opio-reviews/grw.php 85% from 13 tests

The main PHP script in "Widget for OPIO Reviews" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("widget-for-opio-reviews.php" instead of "grw.php")

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
There were no executable files found in this plugin5,635 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
CSS11645643,863
PHP20246471,305
JavaScript27413467

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.13
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods68
▷ Static methods00.00%
▷ Public methods6291.18%
▷ Protected methods22.94%
▷ Private methods45.88%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 1.68MB with 1.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/business_step1.png363.12KB112.42KB▼ 69.04%
assets/img/business_step2.png200.76KB61.11KB▼ 69.56%
assets/img/facebook-recommends.png0.41KB0.27KB▼ 33.57%
assets/img/org_step2.png339.45KB100.07KB▼ 70.52%
assets/img/org_step1.png120.33KB32.97KB▼ 72.60%