84% wp-social-proof

Code Review | WP Social Proof

WordPress plugin WP Social Proof scored84%from 54 tests.

About plugin

  • Plugin page: wp-social-proof
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Sep 7, 2020
  • Latest release: Sep 7, 2020
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: CodeCabin_ (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /448 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.64MB] [CPU: ▼22.87ms] Passed 4 tests

A check of server-side resources used by WP Social Proof
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.82 ▼8.70
Dashboard /wp-admin3.33 ▲0.0346.49 ▼12.52
Posts /wp-admin/edit.php3.44 ▲0.0950.10 ▲0.75
Add New Post /wp-admin/post-new.php3.21 ▼2.6738.30 ▼70.25
Media Library /wp-admin/upload.php3.25 ▲0.0236.43 ▼0.00
String Editor /wp-admin/admin.php?page=wp_social_proof_string_editor3.2731.53
WP Social Proof /wp-admin/admin.php?page=wp_social_proof3.2934.52

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Social Proof
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲20613.91 ▼0.8211.95 ▲9.9937.46 ▼3.93
Dashboard /wp-admin2,221 ▲465.60 ▼0.0383.18 ▼28.2168.82 ▲28.27
Posts /wp-admin/edit.php2,126 ▲262.01 ▼0.0338.60 ▼4.0040.59 ▲7.87
Add New Post /wp-admin/post-new.php1,565 ▲2823.24 ▲5.16771.17 ▲158.6955.56 ▼33.23
Media Library /wp-admin/upload.php1,429 ▲294.18 ▼0.0697.17 ▼7.4968.24 ▲20.37
String Editor /wp-admin/admin.php?page=wp_social_proof_string_editor9172.1523.0328.69
WP Social Proof /wp-admin/admin.php?page=wp_social_proof1,2572.0625.8543.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-social-proof/html/admin/page.string-editor.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPSocialProof\\Datasource' not found in wp-content/plugins/wp-social-proof/classes/integrations/class.woo-data.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-social-proof/html/upsell/settings-appearance-bottom.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPSocialProof\\plugin_dir_path() in wp-content/plugins/wp-social-proof/wp-social-proof.php:20
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-social-proof/html/templates/standard.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-social-proof/html/upsell/settings-general-bottom.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WPSocialProof\\Datasource' not found in wp-content/plugins/wp-social-proof/classes/integrations/class.user-data.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'WPSP_DIRclasses/class.upsell-core.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-social-proof/classes/class.core.php on line 5
    • > PHP Warning
      require_once(WPSP_DIRclasses/class.content-template.php): failed to open stream: No such file or directory in wp-content/plugins/wp-social-proof/classes/class.content-manager.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-social-proof/html/upsell/settings-container-bottom.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: product promotions, registration notifications, social proof, sales notifications, woocommerce

wp-social-proof/wp-social-proof.php 85% from 13 tests

The main file in "WP Social Proof" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • 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
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
No dangerous file extensions were detected1,372 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP1822335982
CSS3542267
JavaScript2308123

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods5787.69%
▷ Protected methods00.00%
▷ Private methods812.31%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/upsell/feature_user_info.png13.27KB6.60KB▼ 50.26%
assets/images/blue.png5.49KB1.96KB▼ 64.34%
assets/images/upsell/feature_on_sale.png9.86KB5.63KB▼ 42.90%
assets/images/red.png5.37KB1.90KB▼ 64.73%
assets/images/standard_icon.png1.94KB1.03KB▼ 46.70%