84% goodreviews

Code Review | GoodReviews

WordPress plugin GoodReviews scored 84% from 54 tests.

About plugin

  • Plugin page: goodreviews
  • Plugin version: 2.2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Apr 14, 2012
  • Latest release: Sep 30, 2020
  • Number of updates: 102
  • Update frequency: every 30.3 days
  • Top authors: jhanbackjr (98.04%)w33zy (2.94%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 15,651 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▲0.06ms] Passed 4 tests

Server-side resources used by GoodReviews
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.39 ▼3.47
Dashboard /wp-admin3.39 ▲0.0848.31 ▼0.31
Posts /wp-admin/edit.php3.50 ▲0.1449.93 ▲5.22
Add New Post /wp-admin/post-new.php5.96 ▲0.0895.38 ▲2.07
Media Library /wp-admin/upload.php3.31 ▲0.0836.13 ▲1.96
GoodReviews /wp-admin/options-general.php?page=goodrev-options3.3033.83
Usage /wp-admin/admin.php?page=goodrev-usages3.3032.70
Tests /wp-admin/admin.php?page=goodrev-tests3.3033.80
Performance /wp-admin/admin.php?page=goodrev-perform3.3032.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 10 new options
New WordPress options
goodrev-clearcache
widget_recent-posts
widget_recent-comments
widget_goodreviews-buybook
widget_theysaidso_widget
theysaidso_admin_options
widget_goodreviews-bookinfo
can_compress_scripts
db_upgraded
widget_goodreviews-reviews

Browser metrics Passed 4 tests

GoodReviews: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.30 ▼1.101.63 ▼0.2041.16 ▼2.69
Dashboard /wp-admin2,216 ▲284.85 ▼0.05108.73 ▲2.6542.92 ▲0.04
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0041.01 ▲5.0336.25 ▲1.01
Add New Post /wp-admin/post-new.php1,548 ▲2818.48 ▼4.75616.09 ▼46.6355.54 ▲2.97
Media Library /wp-admin/upload.php1,386 ▼54.22 ▲0.0597.90 ▼6.2741.37 ▼2.99
GoodReviews /wp-admin/options-general.php?page=goodrev-options1,1202.0325.9826.59
Usage /wp-admin/admin.php?page=goodrev-usages1,0642.0224.1539.70
Tests /wp-admin/admin.php?page=goodrev-tests1,0582.0523.1826.76
Performance /wp-admin/admin.php?page=goodrev-perform1,2162.0322.6230.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_goodreviews-reviews
    • widget_recent-posts
    • can_compress_scripts
    • widget_goodreviews-buybook
    • widget_goodreviews-bookinfo

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/goodreviews/jhgrclasses.php:794
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/goodreviews/goodreviews.php:31

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 97% 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:
  • Screenshots: These screenshots do not have images: #1 (The Settings page), #2 (The plugin in action), #3 (The shortcode in a post)
Please take inspiration from this readme.txt

goodreviews/goodreviews.php Passed 13 tests

"GoodReviews" version 2.2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
87 characters long description:
Retrieves Goodreads.com reviews for books you choose to display on your Wordpress blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,914 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP41761111,352
CSS21448562

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity25.00
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods76
▷ Static methods00.00%
▷ Public methods7598.68%
▷ Protected methods00.00%
▷ Private methods11.32%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.66MB with 0.43MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png262.91KB95.18KB▼ 63.80%
screenshot-3.png107.68KB34.47KB▼ 67.99%
screenshot-2.png302.16KB108.04KB▼ 64.24%