73% say-it

Code Review | Say It!

WordPress plugin Say It! scored73%from 54 tests.

About plugin

  • Plugin page: say-it
  • Plugin version: 4.0.1
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2019
  • Latest release: Nov 12, 2021
  • Number of updates: 50
  • Update frequency: every 19.2 days
  • Top authors: dadipaq (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active /6,305 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.52MB] [CPU: ▲3.18ms] Passed 4 tests

Analyzing server-side resources used by Say It!
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5243.91 ▲7.52
Dashboard /wp-admin3.83 ▲0.5249.32 ▲2.25
Posts /wp-admin/edit.php3.88 ▲0.5257.17 ▲8.01
Add New Post /wp-admin/post-new.php6.43 ▲0.5487.06 ▼5.05
Media Library /wp-admin/upload.php3.75 ▲0.5245.33 ▲9.58
Say It! /wp-admin/options-general.php?page=say-it3.6835.04

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

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

Browser metrics Passed 4 tests

Say It!: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲19016.35 ▲1.995.97 ▲4.4338.27 ▼1.53
Dashboard /wp-admin2,227 ▲396.48 ▲1.60144.68 ▲30.0937.69 ▼8.12
Posts /wp-admin/edit.php2,112 ▲233.57 ▲1.5882.29 ▲43.1035.63 ▼2.10
Add New Post /wp-admin/post-new.php1,702 ▲17425.30 ▲7.29716.13 ▲91.1636.28 ▼22.84
Media Library /wp-admin/upload.php1,406 ▲155.33 ▲1.10130.45 ▲32.0242.82 ▲0.15
Say It! /wp-admin/options-general.php?page=say-it1,4403.6776.2229.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=say-it
    • > Notice in wp-content/plugins/say-it/admin/partials/say-it-admin-display-google.php+58
    Undefined variable: google_languages
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=say-it
    • > Warning in wp-content/plugins/say-it/admin/partials/say-it-admin-display-amazon.php+34
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/options-general.php?page=say-it
    • > Notice in wp-content/plugins/say-it/admin/partials/say-it-admin-display-google.php+87
    Undefined variable: google_voices
    • > GET request to /wp-admin/options-general.php?page=say-it
    • > Notice in wp-content/plugins/say-it/admin/partials/say-it-admin-display-amazon.php+34
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=say-it
    • > Notice in wp-content/plugins/say-it/admin/partials/say-it-admin-display-debug.php+17
    Undefined index: google_tts_key
    • > GET request to /wp-admin/options-general.php?page=say-it
    • > Notice in wp-content/plugins/say-it/admin/partials/say-it-admin-display-debug.php+20
    Undefined index: amazon_polly_secret

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 take a closer look at the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/say-it/admin/partials/parts/help.php
    • > /wp-content/plugins/say-it/admin/partials/say-it-admin-display.php
    • > /wp-content/plugins/say-it/public/partials/say-it-public-display.php
    • > /wp-content/plugins/say-it/vendor/bin/jp.php
    • > /wp-content/plugins/say-it/vendor/mtdowling/jmespath.php/bin/jp.php
  • 936× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Api\\Serializer\\RestSerializer' not found in wp-content/plugins/say-it/vendor/aws/aws-sdk-php/src/Api/Serializer/RestJsonSerializer.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/say-it/vendor/google/gax/tests/Tests/Unit/AgentHeaderTest.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/say-it/vendor/aws/aws-sdk-php/src/EBS/Exception/EBSException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Grpc\\BaseStub' not found in wp-content/plugins/say-it/vendor/google/cloud-text-to-speech/src/V1/TextToSpeechGrpcClient.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/say-it/vendor/aws/aws-sdk-php/src/RDSDataService/RDSDataServiceClient.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/say-it/vendor/aws/aws-sdk-php/src/CommandPool.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Google\\Auth\\FetchAuthTokenInterface' not found in wp-content/plugins/say-it/vendor/google/auth/src/Credentials/InsecureCredentials.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\CommandInterface' not found in wp-content/plugins/say-it/vendor/aws/aws-sdk-php/src/Command.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/say-it/vendor/aws/aws-sdk-php/src/AugmentedAIRuntime/Exception/AugmentedAIRuntimeException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Event\\SubscriberInterface' not found in wp-content/plugins/say-it/vendor/google/auth/src/Subscriber/AuthTokenSubscriber.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

say-it/say-it.php Passed 13 tests

"Say It!" version 4.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
65 characters long description:
Text to speech plugin helping your website easily say something !

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected84,975 lines of code in 2,111 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,98413,81265,43871,717
JSON50807,440
Markdown361,34304,291
JavaScript8120183638
CSS66441316
Bourne Shell84380162
YAML6210146
XML775102
Protocol Buffers2143862
reStructuredText1352959
make210022
Python171720

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.87
▷ Minimum class complexity1.00
▷ Maximum class complexity419.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces557
Interfaces46
Traits31
Classes1,263
▷ Abstract classes171.35%
▷ Concrete classes1,24698.65%
▷ Final classes141.12%
Methods5,603
▷ Static methods64411.49%
▷ Public methods4,66283.21%
▷ Protected methods1743.11%
▷ Private methods76713.69%
Functions576
▷ Named functions14224.65%
▷ Anonymous functions43475.35%
Constants502
▷ Global constants40.80%
▷ Class constants49899.20%
▷ Public constants498100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin