10% sdstudio-portfolio-for-google-reviews

Code Review | SDStudio Google Reviews for portfolio

WordPress plugin SDStudio Google Reviews for portfolio scored10%from 54 tests.

About plugin

  • Plugin page: sdstudio-portfoli...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0
  • WordPress version: 6.3.1
  • First release: Aug 19, 2019
  • Latest release: Sep 2, 2019
  • Number of updates: 12
  • Update frequency: every 1.8 days
  • Top authors: s.dudchenko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /513 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/sdstudio-portfolio-for-google-reviews/sdstudio_grfp.php+558
    Undefined index: post_type

Server metrics [RAM: ▲0.30MB] [CPU: ▼1.73ms] Passed 4 tests

An overview of server-side resources used by SDStudio Google Reviews for portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2743.56 ▲4.57
Dashboard /wp-admin3.64 ▲0.3351.66 ▲0.55
Posts /wp-admin/edit.php3.68 ▲0.3348.64 ▼2.75
Add New Post /wp-admin/post-new.php6.31 ▲0.4290.38 ▼9.27
Media Library /wp-admin/upload.php3.49 ▲0.2737.43 ▲4.94
Google Reviews Categories /wp-admin/edit-tags.php?taxonomy=category_google_reviews&post_type=sds_google_reviews3.4940.74
SDStudio Google Reviews /wp-admin/edit.php?post_type=sds_google_reviews3.5438.31
Add New /wp-admin/post-new.php?post_type=sds_google_reviews6.3186.79

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 585 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by SDStudio Google Reviews for portfolio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲18913.95 ▼0.447.50 ▲5.2439.86 ▼0.88
Dashboard /wp-admin2,298 ▲1215.80 ▲0.1895.47 ▲4.3338.18 ▼15.39
Posts /wp-admin/edit.php2,203 ▲1002.38 ▲0.3642.52 ▲2.3034.28 ▼2.06
Add New Post /wp-admin/post-new.php1,580 ▲5423.35 ▲0.38693.26 ▲24.6055.23 ▲5.00
Media Library /wp-admin/upload.php1,500 ▲974.30 ▲0.14105.92 ▲3.2847.98 ▲4.76
Google Reviews Categories /wp-admin/edit-tags.php?taxonomy=category_google_reviews&post_type=sds_google_reviews1,3742.4833.2032.93
SDStudio Google Reviews /wp-admin/edit.php?post_type=sds_google_reviews1,2202.3037.3430.28
Add New /wp-admin/post-new.php?post_type=sds_google_reviews6,31420.36866.4334.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/sdstudio-portfolio-for-google-reviews/sdstudio_grfp.php+558
    Undefined index: post_type
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=sds_google_reviews
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/sdstudio-portfolio-for-google-reviews/sdstudio_grfp.php+558
    Undefined index: post_type

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sdstudio-portfolio-for-google-reviews/admin/partials/sdstudio_grfp-admin-display.php
    • > /wp-content/plugins/sdstudio-portfolio-for-google-reviews/public/partials/sdstudio_grfp-public-display.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPHtmlParser\\Dom\\LeafNode' not found in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/TextNode.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPHtmlParser\\Dom\\AbstractNode' not found in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/ArrayNode.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPHtmlParser\\Selector\\ParserInterface' not found in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Selector/Parser.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPHtmlParser\\Dom\\ArrayNode' not found in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/InnerNode.php:13
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/string-encode/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/string-encode/phpunit.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPHtmlParser\\Dom\\InnerNode' not found in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/MockNode.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPHtmlParser\\Dom\\AbstractNode' not found in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/LeafNode.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPHtmlParser\\CurlInterface' not found in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Curl.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPHtmlParser\\Dom\\InnerNode' not found in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/HtmlNode.php:12
    • > PHP Warning
      require(wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/string-encode/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/vendor/paquettg/string-encode/phpunit.php on line 15

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sds_google_reviews
    • > Javascript (severe) in unknown
    /wp-content/plugins/sdstudio-portfolio-for-google-reviews/admin/js/sdstudio_grfp-admin.js?ver=1.0.2 45:29 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration 93% 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
5 plugin tags: google, portfolio, reviews, graber, get

sdstudio-portfolio-for-google-reviews/sdstudio_grfp.php 85% from 13 tests

Analyzing the main PHP file in "SDStudio Google Reviews for portfolio" version 1.0.2
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("sdstudio-portfolio-for-google-reviews.php" instead of "sdstudio_grfp.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
It is important to fix the following items
  • Do not distribute dangerous files with your plugin
    • .url - Internet Shortcut in Firefox, IE, Chrome, Safari
      • wp-content/plugins/sdstudio-portfolio-for-google-reviews/php-html-parser-master/php-html-parser.url
      • wp-content/plugins/sdstudio-portfolio-for-google-reviews/admin/sweetalert2/test/sweetalert2.github.io.url
      • wp-content/plugins/sdstudio-portfolio-for-google-reviews/admin/sweetalert2/sweetalert2.github.io.url
32,531 lines of code in 483 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1765,2058,43213,171
PHP1933,2158,73511,083
CSS234751,1863,276
PO File227549752,086
Sass4832701,723
JSON800527
HTML11220356
SVG200123
Markdown6430102
YAML24051
XML21033

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.30
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces27
Interfaces7
Traits0
Classes159
▷ Abstract classes159.43%
▷ Concrete classes14490.57%
▷ Final classes96.25%
Methods1,107
▷ Static methods1049.39%
▷ Public methods91582.66%
▷ Protected methods18216.44%
▷ Private methods100.90%
Functions116
▷ Named functions3530.17%
▷ Anonymous functions8169.83%
Constants29
▷ Global constants620.69%
▷ Class constants2379.31%
▷ Public constants23100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
31 PNG files occupy 1.39MB with 0.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/AnimatedButtons/images/icons/2.png6.53KB3.01KB▼ 53.86%
admin/AnimatedButtons/css/websymbols/specimen_files/websymbols-regular-cleartype.png87.83KB50.22KB▼ 42.82%
assets/screenshot-4.png166.93KB67.37KB▼ 59.64%
assets/screenshot-2.png260.00KB97.17KB▼ 62.63%
admin/AnimatedButtons/images/stucco.png34.47KB37.45KB0.00%