68% gk-sms

Code Review | gk-sms

WordPress plugin gk-sms scored68%from 54 tests.

About plugin

  • Plugin page: gk-sms
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 15, 2013
  • Latest release: Sep 16, 2013
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: grantnorwood (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,847 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
Install script ran successfully

Server metrics [RAM: ▼0.85MB] [CPU: ▼32.22ms] Passed 4 tests

Server-side resources used by gk-sms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1043.52 ▲3.59
Dashboard /wp-admin3.09 ▼0.2123.10 ▼28.36
Posts /wp-admin/edit.php3.09 ▼0.2725.44 ▼21.94
Add New Post /wp-admin/post-new.php3.09 ▼2.8023.39 ▼71.85
Media Library /wp-admin/upload.php3.09 ▼0.1427.63 ▼6.74

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

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

Browser metrics Passed 4 tests

gk-sms: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.72 ▲0.352.19 ▲0.2943.65 ▼0.92
Dashboard /wp-admin2,204 ▲295.55 ▼0.1085.59 ▼13.8738.28 ▼4.13
Posts /wp-admin/edit.php2,112 ▲121.96 ▼0.0235.82 ▲2.6337.23 ▲1.41
Add New Post /wp-admin/post-new.php1,538 ▲1222.84 ▼0.79645.67 ▼4.4751.12 ▼1.01
Media Library /wp-admin/upload.php1,412 ▲124.22 ▲0.01109.75 ▲14.5345.44 ▲5.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5453
    Function add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gk-sms/lib/twilio-php/tests/Bootstrap.php
  • 56× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/gk-sms/lib/twilio-php/Services/Twilio/Rest/Notification.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/gk-sms/lib/twilio-php/Services/Twilio/Rest/ShortCode.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/gk-sms/lib/twilio-php/Services/Twilio/Rest/UsageRecord.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/gk-sms/lib/twilio-php/Services/Twilio/Rest/Account.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_UsageResource' not found in wp-content/plugins/gk-sms/lib/twilio-php/Services/Twilio/TimeRangeResource.php:9
    • > PHP Warning
      require_once(Twilio/RequestValidator.php): failed to open stream: No such file or directory in wp-content/plugins/gk-sms/lib/twilio-php/tests/RequestValidatorTest.php on line 3
    • > PHP Warning
      require_once(Twilio/Twiml.php): failed to open stream: No such file or directory in wp-content/plugins/gk-sms/lib/twilio-php/tests/TwimlTest.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/gk-sms/lib/twilio-php/Services/Twilio/Rest/Members.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/gk-sms/lib/twilio-php/Services/Twilio/Rest/Accounts.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/gk-sms/lib/twilio-php/Services/Twilio/Rest/Application.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === gk-sms === )
You can take inspiration from this readme.txt

gk-sms/gk-sms.php Passed 13 tests

The principal PHP file in "gk-sms" v. 1.0.1 is loaded by WordPress automatically on each request
112 characters long description:
Twilio integration for WordPress. Send SMS text messages from your WordPress site using a valid Twilio account!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin12,627 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
CSS61,001596,359
PHP676747753,452
JavaScript47274621,641
reStructuredText249601,181600
Markdown21110232
make2288134
Python27114396
HTML32071
JSON10029
XML1007
YAML1006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.96
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.66
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes91
▷ Abstract classes33.30%
▷ Concrete classes8896.70%
▷ Final classes00.00%
Methods269
▷ Static methods134.83%
▷ Public methods25795.54%
▷ Protected methods103.72%
▷ Private methods20.74%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/bootstrap/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
lib/bootstrap/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%