10% at-sms

Code Review | Africa's Talking SMS Plugin

WordPress plugin Africa's Talking SMS Plugin scored10%from 54 tests.

About plugin

  • Plugin page: at-sms
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Jan 10, 2020
  • Latest release: Mar 30, 2022
  • Number of updates: 11
  • Update frequency: every 73.8 days
  • Top authors: manofstrong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,204 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/at-sms/src/vendor/composer/autoload_real.php+25
    require(wp-content/plugins/at-sms/src/vendor/composer/platform_check.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼4.27ms] Passed 4 tests

Server-side resources used by Africa's Talking SMS Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.08 ▲3.35
Dashboard /wp-admin3.31 ▼0.0447.43 ▼10.86
Posts /wp-admin/edit.php3.36 ▲0.0045.61 ▲1.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.19 ▼9.36
Media Library /wp-admin/upload.php3.23 ▲0.0034.46 ▲2.03

Server storage [IO: ▲0.87MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 160 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Africa's Talking SMS Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▲0.462.78 ▲1.2248.72 ▲8.10
Dashboard /wp-admin2,189 ▲145.55 ▼0.02100.73 ▲1.3444.14 ▲4.81
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0338.61 ▲3.7936.93 ▼4.28
Add New Post /wp-admin/post-new.php1,536 ▲823.16 ▼0.02649.40 ▲36.8052.47 ▼1.14
Media Library /wp-admin/upload.php1,403 ▼04.20 ▲0.05103.77 ▲10.1050.51 ▲9.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/at-sms/src/vendor/africastalking/africastalking/example/views/index.php
  • 61× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/at-sms/src/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/at-sms/src/vendor/guzzlehttp/psr7/src/InflateStream.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/at-sms/src/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/at-sms/src/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/at-sms/src/vendor/guzzlehttp/psr7/src/Request.php:13
    • > PHP Warning
      require(vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/at-sms/src/vendor/africastalking/africastalking/example/index.php on line 2
    • > PHP Warning
      require(wp-content/plugins/at-sms/src/vendor/composer/platform_check.php): failed to open stream: No such file or directory in wp-content/plugins/at-sms/src/vendor/composer/autoload_real.php on line 25
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/at-sms/src/vendor/guzzlehttp/psr7/src/CachingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/at-sms/src/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/at-sms/src/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: sms, africas talking, at, bulk sms api

at-sms/AT-SMS-Plugin.php 85% from 13 tests

The primary PHP file in "Africa's Talking SMS Plugin" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("at-sms.php" instead of "AT-SMS-Plugin.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin15,315 lines of code in 141 files:
LanguageFilesBlank linesComment linesLines of code
PHP1112,2325,36810,243
Markdown121,24903,671
JSON900978
JavaScript4581268
CSS21619120
XML10016
Dockerfile18010
make1409

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity14.42
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces10
Interfaces15
Traits2
Classes79
▷ Abstract classes11.27%
▷ Concrete classes7898.73%
▷ Final classes911.54%
Methods762
▷ Static methods729.45%
▷ Public methods60879.79%
▷ Protected methods344.46%
▷ Private methods12015.75%
Functions149
▷ Named functions7550.34%
▷ Anonymous functions7449.66%
Constants61
▷ Global constants00.00%
▷ Class constants61100.00%
▷ Public constants61100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/2delete.png0.52KB0.50KB▼ 4.50%
images/logo.png0.50KB0.54KB0.00%
images/2logo.png0.68KB0.75KB0.00%
images/delete.png0.45KB0.36KB▼ 21.34%