84% my-restaurant-reviews

Code Review | My Restaurant Reviews

WordPress plugin My Restaurant Reviews scored84%from 54 tests.

About plugin

  • Plugin page: my-restaurant-rev...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2019
  • Latest release: Jun 7, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: anuragbhandari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /862 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼2.42ms] Passed 4 tests

Server-side resources used by My Restaurant Reviews
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.35 ▼1.12
Dashboard /wp-admin3.48 ▲0.1854.69 ▼1.82
Posts /wp-admin/edit.php3.59 ▲0.2452.17 ▼0.29
Add New Post /wp-admin/post-new.php6.08 ▲0.1990.96 ▼6.45
Media Library /wp-admin/upload.php3.40 ▲0.1735.28 ▲0.22
My Restaurant Reviews /wp-admin/options-general.php?page=my_restaurant_reviews3.3839.28

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for My Restaurant Reviews
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.86 ▼0.739.45 ▲7.7043.28 ▲0.56
Dashboard /wp-admin2,211 ▲235.81 ▲0.9198.75 ▼9.1240.21 ▼6.92
Posts /wp-admin/edit.php2,094 ▲52.00 ▼0.1836.96 ▼4.0533.24 ▼3.66
Add New Post /wp-admin/post-new.php1,521 ▼2123.59 ▲5.39684.33 ▲12.8657.92 ▲2.15
Media Library /wp-admin/upload.php1,393 ▲84.24 ▲0.0699.41 ▼7.0943.48 ▼3.17
My Restaurant Reviews /wp-admin/options-general.php?page=my_restaurant_reviews1,0602.1926.9532.68

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/my-restaurant-reviews/admin/partials/mrr-admin-display.php
    • > /wp-content/plugins/my-restaurant-reviews/public/partials/mrr-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: google-my-business, google-maps, restaurant, google, reviews...

my-restaurant-reviews/my-restaurant-reviews.php 92% from 13 tests

The main PHP file in "My Restaurant Reviews" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin946 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12257787831
CSS216962
JavaScript210053

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.14
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods61
▷ Static methods23.28%
▷ Public methods4777.05%
▷ Protected methods00.00%
▷ Private methods1422.95%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected