64% tfw-reviews

Code Review | Review Plugin

WordPress plugin Review Plugin scored 64% from 54 tests.

About plugin

  • Plugin page: tfw-reviews
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 22, 2020
  • Latest release: Jul 3, 2020
  • Number of updates: 8
  • Update frequency: every 5.3 days
  • Top authors: misvinay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 404 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.94MB] [CPU: ▼33.65ms] Passed 4 tests

Server-side resources used by Review Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.81 ▼4.95
Dashboard /wp-admin3.01 ▼0.3024.44 ▼22.84
Posts /wp-admin/edit.php3.01 ▼0.3523.76 ▼27.27
Add New Post /wp-admin/post-new.php3.01 ▼2.8824.69 ▼69.87
Media Library /wp-admin/upload.php3.01 ▼0.2221.89 ▼14.62

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_talforweb_review
New WordPress options
widget_recent-posts
theysaidso_admin_options
talforweb_place_id
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Review Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,135 ▲38913.61 ▼1.147.15 ▲5.3547.79 ▲4.60
Dashboard /wp-admin2,222 ▲344.84 ▼1.03107.63 ▲7.9238.36 ▼4.22
Posts /wp-admin/edit.php2,105 ▲132.01 ▼0.0541.12 ▼0.3435.89 ▼2.76
Add New Post /wp-admin/post-new.php1,546 ▲1823.16 ▲4.94668.06 ▲72.0063.40 ▲19.41
Media Library /wp-admin/upload.php1,401 ▲104.18 ▼0.0292.48 ▼9.3640.95 ▼1.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/tfw-reviews/index.php+24
    Undefined index: settings-updated
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_talforweb_review
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • talforweb_place_id
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • 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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/tfw-reviews/review.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tfw-reviews/index.php:13

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 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
3 plugin tags: reviews, google, google places reviews

tfw-reviews/index.php 92% from 13 tests

The main PHP script in "Review Plugin" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("tfw-reviews.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected257 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33616173
CSS112068
JavaScript11016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/review.png4.43KB2.78KB▼ 37.13%
images/star.png0.17KB0.23KB0.00%