84% reviews-for-elementor

Code Review | Reviews for Elementor

WordPress plugin Reviews for Elementor scored84%from 54 tests.

About plugin

  • Plugin page: reviews-for-eleme...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Nov 15, 2019
  • Latest release: Nov 16, 2019
  • Number of updates: 11
  • Update frequency: every 0.2 days
  • Top authors: nahiro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /580 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
Installer ran successfully

Server metrics [RAM: ▼0.06MB] [CPU: ▼19.40ms] Passed 4 tests

Server-side resources used by Reviews for Elementor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0749.67 ▲8.66
Dashboard /wp-admin3.30 ▼0.0430.33 ▼23.45
Posts /wp-admin/edit.php3.38 ▲0.0233.02 ▼14.84
Add New Post /wp-admin/post-new.php5.62 ▼0.2762.44 ▼29.86
Media Library /wp-admin/upload.php3.32 ▲0.1025.45 ▼9.44

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
testimonials_settings
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Reviews for Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲11013.42 ▼0.842.21 ▲0.5841.97 ▼0.25
Dashboard /wp-admin2,238 ▲615.15 ▼0.51101.83 ▲13.0643.98 ▲4.85
Posts /wp-admin/edit.php2,140 ▲402.61 ▲0.6242.30 ▲5.3331.98 ▼15.27
Add New Post /wp-admin/post-new.php1,561 ▲3523.08 ▼0.06696.17 ▲47.3638.23 ▼14.62
Media Library /wp-admin/upload.php1,440 ▲404.88 ▲0.66105.55 ▲3.0041.16 ▼4.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • testimonials_settings
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/reviews-for-elementor/Reviews_for_Elementor.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: reviews, google, google reviews for elementor, elementor google reviews, elementor

reviews-for-elementor/Reviews_for_Elementor.php 92% from 13 tests

This is the main PHP file of "Reviews for Elementor" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("reviews-for-elementor.php" instead of "Reviews_for_Elementor.php")

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
Success! There were no dangerous files found in this plugin16,359 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript84,48227912,613
CSS620191,958
PHP4391411,788

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity50.33
▷ Minimum class complexity8.00
▷ Maximum class complexity75.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods48
▷ Static methods12.08%
▷ Public methods48100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/google-img.png20.37KB3.96KB▼ 80.54%