10% boltron-gshop-api

Code Review | Boltron - GShop API

WordPress plugin Boltron - GShop API scored10%from 54 tests.

About plugin

  • Plugin page: boltron-gshop-api
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.2
  • WordPress version: 6.3.1
  • First release: Apr 30, 2019
  • Latest release: Apr 30, 2019
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: phanesco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /562 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/boltron-gshop-api/init.php+18
    require_once(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

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

This is a short check of server-side resources used by Boltron - GShop API
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.12 ▼4.35
Dashboard /wp-admin3.31 ▲0.0051.42 ▲0.06
Posts /wp-admin/edit.php3.36 ▲0.0050.99 ▲0.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.55 ▼7.29
Media Library /wp-admin/upload.php3.23 ▲0.0035.21 ▼3.51

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Boltron - GShop API
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.25 ▼0.102.20 ▲0.4550.19 ▲4.15
Dashboard /wp-admin2,195 ▲185.64 ▼0.0182.37 ▼7.5340.28 ▼5.50
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0237.50 ▼2.6239.97 ▲2.43
Add New Post /wp-admin/post-new.php1,526 ▼223.39 ▲0.04643.33 ▼55.6553.94 ▼2.70
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.07100.07 ▼13.5943.35 ▼4.23

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 did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 55× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/Cache/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/boltron-gshop-api/includes/Google/Cache/Null.php on line 35
    • > PHP Warning
      require_once(Google/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/boltron-gshop-api/includes/Google/Auth/Exception.php on line 35
    • > PHP Warning
      require_once(Google/Auth/Abstract.php): failed to open stream: No such file or directory in wp-content/plugins/boltron-gshop-api/includes/Google/Auth/AppIdentity.php on line 49
    • > PHP Warning
      require_once(Google/Cache/Abstract.php): failed to open stream: No such file or directory in wp-content/plugins/boltron-gshop-api/includes/Google/Cache/Memcache.php on line 35
    • > PHP Warning
      require_once(Google/Auth/OAuth2.php): failed to open stream: No such file or directory in wp-content/plugins/boltron-gshop-api/includes/Google/Auth/AssertionCredentials.php on line 35
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/IO/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/boltron-gshop-api/includes/Google/IO/Stream.php on line 47
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/boltron-gshop-api/includes/Google/Service/ShoppingContent.php:65
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/Cache/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/boltron-gshop-api/includes/Google/Cache/File.php on line 35
    • > PHP Warning
      require_once(Google/Http/Request.php): failed to open stream: No such file or directory in wp-content/plugins/boltron-gshop-api/includes/Google/Http/CacheParser.php on line 35
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/Auth/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/boltron-gshop-api/includes/Google/Auth/AppIdentity.php on line 49

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #10, #11, #12, #13, #14, #15, #16, #18, #19, #2, #20, #3, #4, #5, #6, #7, #8, #9 in boltron-gshop-api/assets to your readme.txt
The official readme.txt is a good inspiration

boltron-gshop-api/init.php 92% from 13 tests

The main file in "Boltron - GShop API" v. 1.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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("boltron-gshop-api.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin8,716 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP456,1112,4168,673
CSS13024
JavaScript19019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.85
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes109
▷ Abstract classes54.59%
▷ Concrete classes10495.41%
▷ Final classes00.00%
Methods850
▷ Static methods121.41%
▷ Public methods81295.53%
▷ Protected methods111.29%
▷ Private methods273.18%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants34
▷ Global constants12.94%
▷ Class constants3397.06%
▷ Public constants33100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/favicon.png0.51KB0.61KB0.00%