73% camoo-sms

Code Review | CAMOO SMS

WordPress plugin CAMOO SMS scored 73% from 54 tests.

About plugin

  • Plugin page: camoo-sms
  • Plugin version: 3.0.1
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 26, 2019
  • Latest release: Jul 24, 2023
  • Number of updates: 43
  • Update frequency: every 34.6 days
  • Top authors: camoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,897 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.33ms] Passed 4 tests

Server-side resources used by CAMOO SMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.55 ▼4.48
Dashboard /wp-admin3.31 ▲0.0050.47 ▲0.77
Posts /wp-admin/edit.php3.36 ▲0.0046.80 ▼1.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.02 ▼2.10
Media Library /wp-admin/upload.php3.23 ▲0.0033.31 ▼0.85

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 1,985 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

CAMOO SMS: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.76 ▲0.381.69 ▼0.0149.00 ▲2.41
Dashboard /wp-admin2,209 ▲215.97 ▲0.0396.86 ▼19.8836.61 ▼11.12
Posts /wp-admin/edit.php2,086 ▼31.97 ▼0.0935.14 ▼4.8731.53 ▼4.73
Add New Post /wp-admin/post-new.php1,533 ▼023.23 ▲0.29563.06 ▼64.7651.57 ▼5.62
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.0295.10 ▼0.6740.51 ▼0.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 without warnings or errors
    • > Notice in wp-includes/class-wpdb.php+789
    Undefined property: wpdb::$tb_prefix
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 194× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Rijndael' not found in wp-content/plugins/camoo-sms/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php:59
    • > PHP Parse error
      syntax error, unexpected 'public' (T_PUBLIC), expecting variable (T_VARIABLE) in wp-content/plugins/camoo-sms/vendor/camoo/sms/src/Entity/PersonalizedContent.php on line 9
    • > PHP Fatal error
      Uncaught Error: Interface 'BFunky\\HttpParser\\HttpParserInterface' not found in wp-content/plugins/camoo-sms/vendor/camoo/http-header-parser/src/AbstractHttpParser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/camoo-sms/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/camoo-sms/vendor/camoo/sms/tests/TestCase/TopUpTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/camoo-sms/vendor/camoo/http-header-parser/test/Entity/HttpResponseHeaderTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/camoo-sms/vendor/psr/http-message/src/ResponseInterface.php:22
    • > PHP Parse error
      syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE) in wp-content/plugins/camoo-sms/vendor/camoo/sms/src/Console/Runner.php on line 20
    • > PHP Parse error
      syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE) in wp-content/plugins/camoo-sms/vendor/camoo/sms/src/Response/TopUp.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/camoo-sms/includes/templates/meta-box.php:24

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)
There were no browser issues found

Optimizations

Plugin configuration 90% 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
7 plugin tags: subscribe, cameroon, bulk sms, camoo sarl, sms...

camoo-sms/camoo-sms.php 77% from 13 tests

The principal PHP file in "CAMOO SMS" v. 3.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 361 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin632,221 lines of code in 1,805 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,73411,33234,504626,041
JSON19402,503
Markdown2051102,169
JavaScript94452593
CSS79912457
YAML72828238
XML40291
reStructuredText1747874
Bourne Shell14726
SVG20015
SQL10014

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity22.28
▷ Minimum class complexity1.00
▷ Maximum class complexity644.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces85
Interfaces27
Traits4
Classes290
▷ Abstract classes72.41%
▷ Concrete classes28397.59%
▷ Final classes7325.80%
Methods2,631
▷ Static methods30611.63%
▷ Public methods2,30287.50%
▷ Protected methods2258.55%
▷ Private methods1043.95%
Functions133
▷ Named functions10075.19%
▷ Anonymous functions3324.81%
Constants458
▷ Global constants10122.05%
▷ Class constants35777.95%
▷ Public constants31989.36%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.35MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/images/standard-xml-file.png13.78KB7.15KB▼ 48.10%
assets/images/welcome/what-is-new/wc-order-box-note.png52.38KB18.09KB▼ 65.47%
assets/images/flags.png69.20KB23.42KB▼ 66.16%
assets/images/gdpr.png4.94KB5.00KB0.00%