73% speaker-lite

Code Review | Speaker Lite

WordPress plugin Speaker Lite scored 73% from 54 tests.

About plugin

  • Plugin page: speaker-lite
  • Plugin version: 1.1.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2020
  • Latest release: Mar 23, 2023
  • Number of updates: 51
  • Update frequency: every 19.2 days
  • Top authors: merkulove (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active / 3,473 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▲392.51ms] 75% from 4 tests

Server-side resources used by Speaker Lite
Please fix the following
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 392.51ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.28484.99 ▲442.39
Dashboard /wp-admin3.44 ▲0.14356.05 ▲309.09
Posts /wp-admin/edit.php3.49 ▲0.14482.99 ▲435.53
Add New Post /wp-admin/post-new.php5.99 ▲0.10583.35 ▲485.07
Media Library /wp-admin/upload.php3.31 ▲0.08417.18 ▲383.01

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 1,081 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Speaker Lite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲20313.58 ▼1.075.16 ▲3.1538.68 ▼12.52
Dashboard /wp-admin2,251 ▲634.86 ▼0.03101.51 ▲0.1041.93 ▼2.00
Posts /wp-admin/edit.php2,131 ▲421.97 ▼0.0734.10 ▼3.6834.49 ▲2.15
Add New Post /wp-admin/post-new.php1,709 ▲17921.45 ▲3.16620.52 ▲9.6238.43 ▼11.81
Media Library /wp-admin/upload.php1,430 ▲424.18 ▼0.0393.89 ▼4.3040.71 ▼6.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/speaker-lite/uninstall.php+93
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 504× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/speaker-lite/vendor/google/common-protos/src/Iam/Admin/V1/ServiceAccountKey.php:29
    • > PHP Fatal error
      Trait 'Google\\ApiCore\\GapicClientTrait' not found in wp-content/plugins/speaker-lite/vendor/google/gax/src/LongRunning/Gapic/OperationsGapicClient.php on line 96
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/speaker-lite/vendor/google/common-protos/src/Cloud/ServiceManagement/V1/DisableServiceRequest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/speaker-lite/vendor/google/protobuf/src/Google/Protobuf/Enum.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/speaker-lite/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Grpc\\Gcp\\GcpBaseCall' not found in wp-content/plugins/speaker-lite/vendor/google/grpc-gcp/src/GCPBidiStreamingCall.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/speaker-lite/vendor/google/cloud-text-to-speech/src/V1/Voice.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/speaker-lite/vendor/google/common-protos/src/Api/Expr/V1beta1/SourcePosition.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/speaker-lite/vendor/google/common-protos/src/Api/Expr/V1beta1/Expr/CreateStruct/Entry.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/speaker-lite/vendor/google/common-protos/src/Api/Expr/V1alpha1/ListValue.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === speaker-lite === )
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

speaker-lite/speaker-lite.php 92% from 13 tests

The main file in "Speaker Lite" v. 1.1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "5.0")

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
Everything looks great! No dangerous files found in this plugin93,429 lines of code in 1,046 files:
LanguageFilesBlank linesComment linesLines of code
PHP92815,19261,53162,353
JavaScript185,0228,75415,267
CSS228917169,460
Markdown311,48204,456
JSON24001,563
Bourne Shell4255688
SVG110265
Protocol Buffers2143864
XML40157
Python1164047
make1409

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.27
▷ Minimum class complexity1.00
▷ Maximum class complexity433.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces127
Interfaces33
Traits18
Classes859
▷ Abstract classes50.58%
▷ Concrete classes85499.42%
▷ Final classes505.85%
Methods5,621
▷ Static methods62811.17%
▷ Public methods5,08190.39%
▷ Protected methods1362.42%
▷ Private methods4047.19%
Functions236
▷ Named functions7431.36%
▷ Anonymous functions16268.64%
Constants520
▷ Global constants244.62%
▷ Class constants49695.38%
▷ Public constants496100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sort_asc.png1.00KB0.17KB▼ 82.94%
images/sort_desc.png1.07KB0.17KB▼ 84.18%
images/sort_asc_disabled.png0.14KB0.25KB0.00%
images/sort_both.png0.93KB0.09KB▼ 89.78%
images/sort_desc_disabled.png0.14KB0.25KB0.00%