10% certishopping-social-reviews-for-woocommerce

Code Review | Certishopping Social Reviews for Woocommerce

WordPress plugin Certishopping Social Reviews for Woocommerce scored10%from 54 tests.

About plugin

  • Plugin page: certishopping-soc...
  • Plugin version: 4.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2021
  • Latest release: Aug 21, 2023
  • Number of updates: 36
  • Update frequency: every 21.1 days
  • Top authors: certishopping (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,527 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/certishopping-social-reviews-for-woocommerce/wc_certishopping.php+146
    Undefined variable: plugin

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.86ms] Passed 4 tests

This is a short check of server-side resources used by Certishopping Social Reviews for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.68 ▲0.22
Dashboard /wp-admin3.31 ▲0.0048.89 ▲2.60
Posts /wp-admin/edit.php3.36 ▲0.0047.45 ▼7.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.37 ▼9.30
Media Library /wp-admin/upload.php3.23 ▲0.0033.76 ▼2.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
wc_certishopping_just_installed
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Certishopping Social Reviews for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.361.74 ▼0.1842.92 ▲0.85
Dashboard /wp-admin2,198 ▲215.57 ▼0.0584.33 ▼8.1641.71 ▲2.24
Posts /wp-admin/edit.php2,103 ▲62.01 ▼0.0035.31 ▼1.9742.01 ▲6.01
Add New Post /wp-admin/post-new.php1,528 ▲123.57 ▲0.57662.13 ▼3.7863.96 ▲2.37
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.01100.17 ▼2.6446.93 ▲0.51

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • wc_certishopping_just_installed
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/certishopping-social-reviews-for-woocommerce/wc_certishopping.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/certishopping-social-reviews-for-woocommerce/wc-certishopping-shortcodes.php:34

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 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6, #7 in certishopping-social-reviews-for-woocommerce/assets to your readme.txt
The official readme.txt might help

certishopping-social-reviews-for-woocommerce/wc_certishopping.php 77% from 13 tests

The principal PHP file in "Certishopping Social Reviews for Woocommerce" v. 4.2.7 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 272 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("certishopping-social-reviews-for-woocommerce.php" instead of "wc_certishopping.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,004 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP5163691,491
CSS2130209
PO File1542121
SVG101120
JavaScript221147
YAML14216

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods1354.17%
▷ Protected methods1145.83%
▷ Private methods00.00%
Functions45
▷ Named functions45100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
logo.png21.10KB7.91KB▼ 62.49%
assets/images/logo_small.png2.52KB1.55KB▼ 38.53%
assets/images/logo.png2.64KB1.60KB▼ 39.16%