83% vietnam-social-proof-toaster

Code Review | Vietnam Social Proof Toaster

WordPress plugin Vietnam Social Proof Toaster scored83%from 54 tests.

About plugin

  • Plugin page: vietnam-social-pr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.9-4.9.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2018
  • Latest release: Apr 19, 2018
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: qtvhao (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /649 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.03MB] [CPU: ▼6.68ms] Passed 4 tests

An overview of server-side resources used by Vietnam Social Proof Toaster
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0340.19 ▼1.04
Dashboard /wp-admin3.38 ▲0.0347.34 ▼1.89
Posts /wp-admin/edit.php3.49 ▲0.1049.26 ▼3.91
Add New Post /wp-admin/post-new.php5.96 ▲0.0385.35 ▼19.88
Media Library /wp-admin/upload.php3.30 ▲0.0341.02 ▲3.14
About - Social Proof Toaster /wp-admin/index.php?page=haosf-proof-toaster-about3.2732.14
Vietnam Social Proof Toaster /wp-admin/options-general.php?page=haosf-proof-toaster3.2729.56

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Vietnam Social Proof Toaster
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.35 ▼0.051.97 ▲0.2841.18 ▼4.67
Dashboard /wp-admin2,206 ▲295.62 ▼0.0488.27 ▼3.6039.13 ▼0.39
Posts /wp-admin/edit.php2,108 ▲82.03 ▲0.0538.21 ▼2.5934.50 ▲0.16
Add New Post /wp-admin/post-new.php1,534 ▲822.94 ▼0.07684.05 ▲7.1862.86 ▲6.27
Media Library /wp-admin/upload.php1,408 ▲114.14 ▼0.05110.09 ▼4.3646.32 ▼3.65
About - Social Proof Toaster /wp-admin/index.php?page=haosf-proof-toaster-about8212.1426.2759.69
Vietnam Social Proof Toaster /wp-admin/options-general.php?page=haosf-proof-toaster8302.0330.4029.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Haosf_Social_Proof_Toaster\\Toast' not found in wp-content/plugins/vietnam-social-proof-toaster/includes/class-product-social-proof-toast.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Haosf_Social_Proof_Toaster\\Product_Social_Proof_Toast' not found in wp-content/plugins/vietnam-social-proof-toaster/includes/class-order-count-product-social-proof-toast.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/vietnam-social-proof-toaster/includes/pages/about.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/vietnam-social-proof-toaster/includes/pages/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/vietnam-social-proof-toaster/hao-social-proof-toaster.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

vietnam-social-proof-toaster/hao-social-proof-toaster.php 85% from 13 tests

The entry point to "Vietnam Social Proof Toaster" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("vietnam-social-proof-toaster.php" instead of "hao-social-proof-toaster.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected765 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP97963375
Sass1160166
CSS1130162
PO File1161762

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods617.65%
▷ Public methods2058.82%
▷ Protected methods1235.29%
▷ Private methods25.88%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-1.png98.36KB34.36KB▼ 65.07%