84% good-reviews-wp

Code Review | Five Star Restaurant Reviews

WordPress plugin Five Star Restaurant Reviews scored84%from 54 tests.

About plugin

  • Plugin page: good-reviews-wp
  • Plugin version: 2.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.4
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Nov 7, 2023
  • Number of updates: 57
  • Update frequency: every 59.7 days
  • Top authors: Rustaurius (66.67%)NateWr (35.09%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /51,521 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.79MB] [CPU: ▲3.75ms] Passed 4 tests

An overview of server-side resources used by Five Star Restaurant Reviews
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.26 ▲0.8046.05 ▲3.55
Dashboard /wp-admin4.09 ▲0.7955.50 ▲4.41
Posts /wp-admin/edit.php4.15 ▲0.7959.10 ▲9.95
Add New Post /wp-admin/post-new.php6.81 ▲0.9397.15 ▼2.79
Media Library /wp-admin/upload.php4.01 ▲0.7843.86 ▲9.84
Dashboard /wp-admin/admin.php?page=grfwp-dashboard3.9940.20
Reviews /wp-admin/edit.php?post_type=grfwp-review4.0643.89
About Us /wp-admin/admin.php?page=grfwp-about-us3.9838.11
Settings /wp-admin/admin.php?page=grfwp-settings4.0143.99

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 191 new files
Database: no new tables, 9 new options
New WordPress options
grfwp-installation-time
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_grfwp_widget_reviews
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
grfwp-permission-level

Browser metrics Passed 4 tests

A check of browser resources used by Five Star Restaurant Reviews
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8014.35 ▲0.091.64 ▼0.2242.92 ▼1.90
Dashboard /wp-admin2,241 ▲615.64 ▲0.0294.30 ▼9.9039.77 ▼6.82
Posts /wp-admin/edit.php2,146 ▲461.98 ▼0.0436.31 ▼4.1331.14 ▼8.96
Add New Post /wp-admin/post-new.php6,404 ▲4,86927.71 ▲2.62919.82 ▲248.4336.96 ▼30.78
Media Library /wp-admin/upload.php1,440 ▲404.26 ▲0.09102.96 ▼1.4443.82 ▼1.47
Dashboard /wp-admin/admin.php?page=grfwp-dashboard1,1791.9631.9070.22
Reviews /wp-admin/edit.php?post_type=grfwp-review1,2152.3838.2735.01
About Us /wp-admin/admin.php?page=grfwp-about-us1,1261.8828.9332.27
Settings /wp-admin/admin.php?page=grfwp-settings1,3153.6355.9038.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • grfwp-permission-level
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_grfwp_widget_reviews
    • grfwp-installation-time
    • widget_recent-comments
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 31× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/good-reviews-wp/lib/simple-admin-pages/classes/AdminPageSetting.InfiniteTable.class.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/good-reviews-wp/lib/simple-admin-pages/classes/AdminPageSetting.Number.class.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/good-reviews-wp/includes/template-functions.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/good-reviews-wp/lib/simple-admin-pages/classes/AdminPageSetting.ColorPicker.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/good-reviews-wp/lib/simple-admin-pages/classes/AdminPageSetting.OpeningHours.class.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/good-reviews-wp/lib/simple-admin-pages/classes/AdminPageSetting.WarningTip.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/good-reviews-wp/lib/simple-admin-pages/classes/AdminPageSetting.Password.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/good-reviews-wp/lib/simple-admin-pages/classes/AdminPageSetting.SelectTaxonomy.class.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPage_2_6_13' not found in wp-content/plugins/good-reviews-wp/lib/simple-admin-pages/classes/AdminPage.Submenu.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/good-reviews-wp/lib/simple-admin-pages/classes/AdminPageSetting.SelectPost.class.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: There are too many tags (21 tag instead of maximum 10)
The official readme.txt might help

good-reviews-wp/good-reviews-wp.php Passed 13 tests

"Five Star Restaurant Reviews" version 2.3.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
111 characters long description:
Restaurant reviews made easy. Add and display reviews on your restaurant site using SEO friendly schema markup.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected13,312 lines of code in 149 files:
LanguageFilesBlank linesComment linesLines of code
PHP521,7111,9954,963
CSS223152254,867
JavaScript706013562,924
Markdown31260336
HTML1130118
PO File145183104

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity15.62
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes12.08%
▷ Concrete classes4797.92%
▷ Final classes00.00%
Methods228
▷ Static methods62.63%
▷ Public methods21393.42%
▷ Protected methods00.00%
▷ Private methods156.58%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants9
▷ Global constants9100.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
34 PNG files occupy 1.29MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/fivestartextlogo.png16.97KB7.38KB▼ 56.50%
assets/css/jquery-ui/images/ui-icons_444444_256x240.png3.19KB3.49KB0.00%
assets/css/jquery-ui/images/ui-icons_cc0000_256x240.png3.19KB3.49KB0.00%
assets/img/premium-screenshots/styling1.png68.30KB19.02KB▼ 72.16%
lib/simple-admin-pages/img/options-asset-info.png0.84KB0.42KB▼ 49.53%