10% rccp-free

Code Review | RingCentral Communications Plugin - FREE

WordPress plugin RingCentral Communications Plugin - FREE scored10%from 54 tests.

About plugin

  • Plugin page: rccp-free
  • Plugin version: 1.5.4
  • PHP compatiblity: 8.0.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2019
  • Latest release: Nov 9, 2023
  • Number of updates: 49
  • Update frequency: every 33.8 days
  • Top authors: pbmacintyre (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,325 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▼1.54MB] [CPU: ▼44.32ms] Passed 4 tests

This is a short check of server-side resources used by RingCentral Communications Plugin - FREE
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.45 ▼1.019.82 ▼31.75
Dashboard /wp-admin2.47 ▼0.8412.30 ▼39.66
Posts /wp-admin/edit.php2.47 ▼0.8912.31 ▼28.39
Add New Post /wp-admin/post-new.php2.47 ▼3.4214.35 ▼77.47
Media Library /wp-admin/upload.php2.47 ▼0.7611.76 ▼20.27
Call Me Requests /wp-admin/admin.php?page=ringcentral_list_callme2.4612.46
Settings /wp-admin/admin.php?page=ringcentral_Admin2.4613.64
Add Subscribers /wp-admin/admin.php?page=ringcentral_add_subs2.4612.44
List Subscribers /wp-admin/admin.php?page=ringcentral_list_subs2.4612.91

Server storage [IO: ▲7.86MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,203 new files
Database: 5 new tables, 8 new options
New tables
ringcentral_call_requests
ringcentral_queue
ringcentral_help
ringcentral_control
ringcentral_contacts
New WordPress options
widget_ring_central_callme_widget
widget_ring_central_contacts_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by RingCentral Communications Plugin - FREE
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9314.30 ▲0.231.91 ▲0.2840.39 ▼1.96
Dashboard /wp-admin2,234 ▲705.56 ▼0.1289.35 ▼21.9466.74 ▲25.74
Posts /wp-admin/edit.php2,133 ▲301.99 ▲0.0437.47 ▼3.8734.39 ▼2.96
Add New Post /wp-admin/post-new.php1,557 ▲3123.23 ▲0.11672.05 ▲48.2650.05 ▼3.98
Media Library /wp-admin/upload.php1,436 ▲394.24 ▲0.0898.61 ▼1.0770.62 ▲26.47
Call Me Requests /wp-admin/admin.php?page=ringcentral_list_callme9872.0026.7831.69
Settings /wp-admin/admin.php?page=ringcentral_Admin1,0601.9921.7229.16
Add Subscribers /wp-admin/admin.php?page=ringcentral_add_subs9161.9925.6823.94
List Subscribers /wp-admin/admin.php?page=ringcentral_list_subs1,0812.0025.5731.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ringcentral_contacts_widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_ring_central_contacts_widget
    • widget_ring_central_callme_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ringcentral_list_subs
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ringcentral_contacts_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ringcentral_list_subs
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ringcentral_callme_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ringcentral_list_subs
    • > Notice in wp-content/plugins/rccp-free/includes/ringcentral-list-subscribers.inc+188
    Undefined variable: message

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 take a closer look at the following
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/rccp-free/includes/vendor/rmccue/requests/examples/get.php
    • > /wp-content/plugins/rccp-free/includes/vendor/rmccue/requests/examples/multiple.php
    • > /wp-content/plugins/rccp-free/includes/vendor/rmccue/requests/examples/post.php
    • > /wp-content/plugins/rccp-free/includes/RingAPI/demo/sms.php
    • > /wp-content/plugins/rccp-free/includes/vendor/rmccue/requests/examples/basic-auth.php
    • > /wp-content/plugins/rccp-free/includes/vendor/rmccue/requests/bin/create_pear_package.php
    • > /wp-content/plugins/rccp-free/includes/vendor/pubnub/pubnub/src/PubNub/Models/Consumer/Objects/PNMemberData.php
    • > /wp-content/plugins/rccp-free/includes/vendor/rmccue/requests/examples/cookie_jar.php
    • > /wp-content/plugins/rccp-free/includes/vendor/rmccue/requests/examples/session.php
    • > /wp-content/plugins/rccp-free/includes/vendor/pubnub/pubnub/src/PubNub/Models/Consumer/Objects/PNMembershipData.php
  • 639× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/rccp-free/includes/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception\\Http' not found in wp-content/plugins/rccp-free/includes/vendor/rmccue/requests/src/Exception/Http/Status401.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/rccp-free/includes/vendor/monolog/monolog/tests/Monolog/TestCase.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/rccp-free/includes/RingAPI/demo/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/rccp-free/includes/RingAPI/demo/_bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/rccp-free/includes/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception\\Http' not found in wp-content/plugins/rccp-free/includes/vendor/rmccue/requests/src/Exception/Http/Status418.php:21
    • > PHP Warning
      require_once(wp-content/plugins/rccp-free/includes/vendor/ringcentral/ringcentral-php/demo/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/rccp-free/includes/vendor/ringcentral/ringcentral-php/demo/_bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PubNub\\Callbacks\\SubscribeCallback' not found in wp-content/plugins/rccp-free/includes/RingAPI/src/Subscription/Subscription.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PubNubTestCase' not found in wp-content/plugins/rccp-free/includes/vendor/pubnub/pubnub/tests/integrational/SslTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/rccp-free/includes/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: ring central communications api tools

rccp-free/ringcentral.php 92% from 13 tests

"RingCentral Communications Plugin - FREE" version 1.5.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rccp-free.php" instead of "ringcentral.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin91,113 lines of code in 1,094 files:
LanguageFilesBlank linesComment linesLines of code
PHP94517,62633,80672,882
Markdown704,672013,046
JSON43003,913
YAML15347902
XML9142204
Bourne Shell417257
make211135
CSS131033
JavaScript361232
Dockerfile1005
Python1104

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.99
▷ Minimum class complexity1.00
▷ Maximum class complexity200.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces124
Interfaces78
Traits8
Classes843
▷ Abstract classes232.73%
▷ Concrete classes82097.27%
▷ Final classes17220.98%
Methods5,631
▷ Static methods5369.52%
▷ Public methods4,56481.05%
▷ Protected methods73213.00%
▷ Private methods3355.95%
Functions783
▷ Named functions21227.08%
▷ Anonymous functions57172.92%
Constants498
▷ Global constants234.62%
▷ Class constants47595.38%
▷ Public constants44493.47%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
21 PNG files occupy 0.96MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png53.10KB28.91KB▼ 45.56%
assets/screenshot-17.png27.48KB14.12KB▼ 48.63%
assets/screenshot-7.png12.54KB7.71KB▼ 38.51%
assets/screenshot-15.png8.46KB5.02KB▼ 40.68%
assets/screenshot-2.png7.35KB4.60KB▼ 37.46%