77% rsg-retrieve-google-drive-spreadsheet

Code Review | RSG Retrieve Google Drive Spreadsheet

WordPress plugin RSG Retrieve Google Drive Spreadsheet scored77%from 54 tests.

About plugin

  • Plugin page: rsg-retrieve-goog...
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: Feb 28, 2019
  • Number of updates: 8
  • Update frequency: every 1.0 days
  • Top authors: rynergalaus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /483 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▼1.47ms] Passed 4 tests

A check of server-side resources used by RSG Retrieve Google Drive Spreadsheet
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4042.21 ▲0.79
Dashboard /wp-admin3.68 ▲0.3853.45 ▲3.61
Posts /wp-admin/edit.php3.73 ▲0.3750.05 ▲2.64
Add New Post /wp-admin/post-new.php6.22 ▲0.3385.17 ▼12.91
Media Library /wp-admin/upload.php3.54 ▲0.3139.18 ▲5.96
RSG Addons /wp-admin/admin.php?page=rsg_addons_page3.5134.41
Spreadsheet /wp-admin/admin.php?page=rsggds3.74367.60

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 525 new files
Database: no new tables, 14 new options
New WordPress options
widget_recent-posts
rsggds_title
rsggds_tbl_w
recovery_mode_email_last_sent
rsggds_tbl_color
can_compress_scripts
rsggds_link
rsggds_tbl_h
RSGGDS_VERSION
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for RSG Retrieve Google Drive Spreadsheet
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲19413.85 ▼0.707.51 ▲5.3944.02 ▲0.26
Dashboard /wp-admin2,245 ▲575.97 ▲1.0497.80 ▼19.1439.48 ▼8.47
Posts /wp-admin/edit.php2,134 ▲452.29 ▲0.2839.45 ▼2.1532.73 ▼2.79
Add New Post /wp-admin/post-new.php1,548 ▲3417.87 ▲0.25611.59 ▼72.6056.99 ▼0.68
Media Library /wp-admin/upload.php1,433 ▲454.34 ▲0.1797.65 ▼8.6545.80 ▲1.02
RSG Addons /wp-admin/admin.php?page=rsg_addons_page8302.2026.2434.29
Spreadsheet /wp-admin/admin.php?page=rsggds8461.536.3636.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=rsggds
    • > Error in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/DefaultServiceRequest.php+356
    Uncaught Google\Spreadsheet\Exception\UnauthorizedException: You need permission in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/DefaultServiceRequest.php:356
    Stack trace:
    #0 wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/DefaultServiceRequest.php(241): Google\Spreadsheet\DefaultServiceRequest->execute()
    #1 wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/SpreadsheetService.php(72): Google\Spreadsheet\DefaultServiceRequest->get()
    #2 wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/SpreadsheetService.php(98): Google\Spreadsheet\SpreadsheetService->getResourceById()
    #3 w

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
The following issues need your attention
  • 293× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'GoogleSpreadsheet\\Tests\\Google\\Spreadsheet\\TestBase' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/asimlqt/php-google-spreadsheet-client/tests/Google/Spreadsheet/SpreadsheetServiceTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Spreadsheet\\Exception\\Exception' not found in wp-content/plugins/rsg-retrieve-google-drive-spreadsheet/lib/google/vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/Exception/BadRequestException.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: spreadsheet, google drive, shortcode, rsggds, table

rsg-retrieve-google-drive-spreadsheet/rsggds.php 77% from 13 tests

The main PHP file in "RSG Retrieve Google Drive Spreadsheet" ver. 0.0.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/lang")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("rsg-retrieve-google-drive-spreadsheet.php" instead of "rsggds.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected64,168 lines of code in 493 files:
LanguageFilesBlank linesComment linesLines of code
PHP42310,19827,99152,371
JavaScript32699364,922
Markdown281,55104,742
JSON18001,291
XML1480498
CSS21853260
YAML416075
make1409

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.18
▷ Minimum class complexity1.00
▷ Maximum class complexity627.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
Namespaces41
Interfaces28
Traits5
Classes414
▷ Abstract classes102.42%
▷ Concrete classes40497.58%
▷ Final classes102.48%
Methods3,286
▷ Static methods1394.23%
▷ Public methods2,81685.70%
▷ Protected methods2176.60%
▷ Private methods2537.70%
Functions272
▷ Named functions8129.78%
▷ Anonymous functions19170.22%
Constants334
▷ Global constants267.78%
▷ Class constants30892.22%
▷ Public constants308100.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
No PNG images were found in this plugin