10% reviewpack-reviews

Code Review | Collect Company Reviews - ReviewPack

WordPress plugin Collect Company Reviews - ReviewPack scored10%from 54 tests.

About plugin

  • Plugin page: reviewpack-reviews
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.7
  • WordPress version: 6.3.1
  • First release: Feb 25, 2021
  • Latest release: Mar 14, 2021
  • Number of updates: 10
  • Update frequency: every 1.8 days
  • Top authors: reviewpack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /398 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/reviewpack-reviews/src/Admin/Settings.php+224
    Undefined index: integrations

Server metrics [RAM: ▼1.70MB] [CPU: ▼52.54ms] Passed 4 tests

A check of server-side resources used by Collect Company Reviews - ReviewPack
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1536.55 ▼6.24
Dashboard /wp-admin2.26 ▼1.097.51 ▼53.24
Posts /wp-admin/edit.php2.26 ▼1.108.13 ▼46.26
Add New Post /wp-admin/post-new.php2.26 ▼3.637.90 ▼85.51
Media Library /wp-admin/upload.php2.26 ▼0.977.75 ▼25.16
ReviewPack /wp-admin/options-general.php?page=reviewpack-settings2.269.44
ReviewPack /wp-admin/admin.php?page=reviewpack2.267.34
Widgets /wp-admin/admin.php?page=reviewpack-widgets2.268.77
Invite mail /wp-admin/admin.php?page=reviewpack-invites2.267.84

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Collect Company Reviews - ReviewPack: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲10214.40 ▼0.002.11 ▲0.4837.94 ▼8.86
Dashboard /wp-admin2,264 ▲875.63 ▼0.0288.76 ▼12.0241.93 ▼1.83
Posts /wp-admin/edit.php2,140 ▲402.03 ▲0.0936.62 ▲2.1332.87 ▼4.60
Add New Post /wp-admin/post-new.php1,560 ▲3423.23 ▲0.35670.53 ▲44.6957.91 ▲2.27
Media Library /wp-admin/upload.php1,440 ▲404.33 ▲0.1096.93 ▼2.2346.00 ▼0.70
ReviewPack /wp-admin/options-general.php?page=reviewpack-settings9431.9926.8241.51
ReviewPack /wp-admin/admin.php?page=reviewpack9052.1523.0630.75
Widgets /wp-admin/admin.php?page=reviewpack-widgets9002.0022.1529.12
Invite mail /wp-admin/admin.php?page=reviewpack-invites9032.1822.3830.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/reviewpack-reviews/src/Admin/Settings.php+224
    Undefined index: integrations
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=reviewpack-invites
    • > Notice in wp-content/plugins/reviewpack-reviews/src/Admin/Settings.php+224
    Undefined index: integrations

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 32× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/reviewpack-reviews/views/admin_invites.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ReviewPack\\Models\\AbstractResource' not found in wp-content/plugins/reviewpack-reviews/src/Models/InviteTemplate.php:9
    • > PHP Notice
      Undefined variable: rating in wp-content/plugins/reviewpack-reviews/views/elements/rating.php on line 9
    • > PHP Notice
      Undefined variable: rating in wp-content/plugins/reviewpack-reviews/views/elements/rating.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function http_send_status() in wp-content/plugins/reviewpack-reviews/reviewpack.php:4
    • > PHP Notice
      Undefined variable: rating in wp-content/plugins/reviewpack-reviews/views/elements/rating.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'ReviewPack\\Models\\AbstractResource' not found in wp-content/plugins/reviewpack-reviews/src/Models/Company.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ReviewPack\\Models\\AbstractResource' not found in wp-content/plugins/reviewpack-reviews/src/Models/CompanyScore.php:9
    • > PHP Notice
      Undefined variable: rating in wp-content/plugins/reviewpack-reviews/views/elements/rating.php on line 17
    • > PHP Notice
      Undefined variable: rating in wp-content/plugins/reviewpack-reviews/views/elements/rating.php on line 15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=reviewpack-invites
    • > Network (severe)
    https://sitepack.nl/js/widget.min.js - Failed to load resource: the server responded with a status of 404 ()

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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #3 (An easy overview in a custom dashboard), #4 (Manage the invite mail)
Please take inspiration from this readme.txt

reviewpack-reviews/reviewpack.php 85% from 13 tests

The main file in "Collect Company Reviews - ReviewPack" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("reviewpack-reviews.php" instead of "reviewpack.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected1,826 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP273395201,600
CSS1340198
Markdown16018
JSON20010

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.12
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes16
▷ Abstract classes16.25%
▷ Concrete classes1593.75%
▷ Final classes00.00%
Methods76
▷ Static methods33.95%
▷ Public methods6484.21%
▷ Protected methods11.32%
▷ Private methods1114.47%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants14
▷ Global constants214.29%
▷ Class constants1285.71%
▷ Public constants12100.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
16 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon_160.png6.54KB1.32KB▼ 79.80%
images/icon_32.png1.05KB0.69KB▼ 34.63%
images/rating_30_5.png7.19KB1.42KB▼ 80.23%
images/icon_64.png1.48KB1.01KB▼ 31.81%
images/rating_40_5.png7.11KB1.30KB▼ 81.74%